export | R Documentation |
Writes a .txt
or .xls
or whatever readable from a single shape,
a Coe, or a PCA object, along with individual names and $fac
.
export(x, file, sep, dec)
x |
a |
file |
the filenames |
sep |
the field separator string to feed write.table). (default to tab) tab by default |
dec |
the string to feed write.table) (default |
an external file
This is a simple wrapper around write.table.
Default parameters will write a .txt
file,
readable by foreign programs.
With default parameters, numbers will use dots as decimal points, which is
considered as a character chain in Excel in many countries (locale versions).
This can be solved by using dec=','
as in the examples below.
If you are looking for your file, and did not specified file
,
getwd()
will help.
I have to mention that everytime you use this function, and cowardly run from R to Excel and do 'statistics' there, an innocent and adorable kitten is probably murdered somewhere. Use R!
Other bridges functions:
as_df()
,
bridges
,
complex
# Will write (and remove) files on your working directory!
## Not run:
bf <- efourier(bot, 6)
# Export Coe (here Fourier coefficients)
export(bf) # data.txt which can be opened by every software including MS Excel
# If you come from a country that uses comma as decimal separator (not recommended, but...)
export(bf, dec=',')
export(bf, file='data.xls', dec=',')
# Export PCA scores
bf %>% PCA %>% export()
# for shapes (matrices)
# export(bot[1], file='bot1.txt')
# remove these files from your machine
file.remove("coefficients.txt", "data.xls", "scores.txt")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.