getvector | R Documentation |
getvector, when reading in a csv file using readLines, getvector extracts a line of numbers from a specified line within the readLines object.This function works out how many numbers there are. If you wish to add a comment at the end of a vector of numbers it must be separated from them by the separator. e.g. a comma
getvector(indat, locate, sep = ",")
indat |
the readLines object |
locate |
the line number from which to extract the numbers |
sep |
the separator between numbers, defaults to "," |
a vector of numbers
x <- "12.3, 15.1, 8.7,10.3, # this is a vector of four numbers"
y <- "21.3 # 22.3 # 8.7 # 10.3 # here are another four numbers"
getvector(x) # uses default separator
getvector(y,sep="#")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.