What do you want to save?
Add Code snippet
New code examples in category R
-
-
Stobor 2021-11-12 10:23:14
r dot product
a = c(1,2) b = c(0,1) # Perform the dot product a%*%b Add solution -
Peter Morris 2021-11-11 14:43:14
grep string that ends with R
#START is the pattern you want to grep at the BEGINNING of a string #END is the pattern you want to grep at the END of a string #Grep string that start with START and end with END (both grep have to occur) grep("^START.*\\.END$", filenames, igno... Add solution -
XavierStuvw 2021-11-11 00:29:13
open('data.txt', 'r')
# In R there are many custom functions for reading files, but many of # them are essentially wrappers for read.table() and can be ignored. # Basic syntax using read.table(): data = read.table('/path/to/filename.extension', header=FALSE, ... Add solution
Best helpers
Ranking is empty