Description Usage Arguments Examples
read ncount string tokens
1 | read_strings(count)
|
count |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
# read ncount string tokens
read_strings <- function(count) {
res <- character(count)
icount <- 0
while (icount < count) {
next_line()
tokens <- strsplit(aline, " +", perl=TRUE)[[1]]
ntokens <- length(tokens)
for (itoken in 2:ntokens) {
token <- tokens[itoken]
res[icount+itoken-1] <- token
}
icount <- icount + ntokens - 1
}
res
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.