Description Usage Arguments Examples
These functions are wrappers to write.table
, write.csv
and
write.csv2
. They write a matrix or a data.table in a ".txt" or ".csv"
file in the output folder. The file created has the same name as the object.
1 2 3 4 5 | prWriteTable(name, ..., replace = FALSE)
prWriteCsv(name, ..., replace = FALSE)
prWriteCsv2(name, ..., replace = FALSE)
|
name |
Name of the object to write. Quotes are optional. This argument can also specify the subdirectory of folder "output" where to write the file. |
... |
arguments to |
replace |
If the file already exists, should it be overwritten ? |
1 2 3 4 5 6 7 8 9 10 11 | projectPath <- file.path(tempdir(), "test")
prInit(projectPath)
mydata <- data.frame(x = 1:10, y = rnorm(10))
prWriteTable(mydata)
list.files(projectPath, recursive = TRUE, include.dirs = TRUE)
# Write in a subdirectory of "output"
prWriteTable("mydir/mydata")
list.files(projectPath, recursive = TRUE, include.dirs = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.