Search notes:

R function: write.csv

write.csv writes data into a CSV file. A CSV file can then be read again with read.csv
#
#  S.a. -> read.csv()
#

col_1 <-  c(   1 ,    2 ,    3 )
col_2 <-  c("foo", "bar", "baz")

c <- cbind(col_1, col_2)

colnames(c) <- c("Num", "Ident")

write.csv(c, file="written.csv", row.names=FALSE)

file.show("written.csv")
# "Num","Ident"
# "1","foo"
# "2","bar"
# "3","baz"
Github repository about-r, path: /functions/write.csv.R

See also

Index to (some) R functions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1758193902, '216.73.216.150', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/functions/write_csv(58): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78