map_to_file: Save outputs to files

Description Usage Arguments Value Examples

Description

Save outputs to files

Usage

1
map_to_file(object, filename, ...)

Arguments

object

The object you want to save as a file

filename

The name of the file that is produced. The extension needs to match the type of object you want to save (csv for tables, jpg/pdf for images)

Value

the object that was given as input (unchanged).

Examples

1
2
3
4
5
6
7
8
9
## Not run: # some table:
mytable<-data.frame(a=1:10,b=1:10)
map_to_file(mytable,"mytable.csv")

# some graphic made with ggplot:
mygraphic<-ggplot(mytable,aes(a,b))+geom_point()
map_to_file(mygraphic,"visualisation.jpg")
map_to_file(mygraphic,"visualisation.pdf")
## End(Not run)

mabafaba/hypegrammaR documentation built on Oct. 2, 2019, 11:33 a.m.