peek | R Documentation |
this returns a character vector which shows the top n lines of a file.
Note: I realized after the fact that this is essentially a duplicate
of the base R function readLines
.
peek(x, n = 2)
x |
a filename |
n |
the number of lines to return |
Michael I. Love
filename <- tempfile()
x<-matrix(round(rnorm(10^4),2),1000,10)
colnames(x)=letters[1:10]
write.csv(x,file=filename,row.names=FALSE)
peek(filename)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.