Description Usage Arguments Details Value Note Examples
View source: R/access_export.R
Directly connect (and disconnect at the end) with the Microssoft Office Access database using the RODBC package and write one or multiple data sets.
1 | access_export(file,x,tablename=as.character(1:length(x)),uid="",pwd="",...)
|
file |
The path to the file with .mdb extension. |
x |
Either a data frame or a list containing multiple data frame to be exported. |
tablename |
A character or a vector character containing the names that will receive the tables where the data frame is stored. If it is a vector, it must follow the same order as the data frames in |
uid |
see |
pwd |
see |
... |
see |
Date variables are exported as an integer, they might be converted to character if a character representation in the access database is wanted.
No value is returned.
This function connects and writes on an existing Microsoft Office Access database, but it can't create a new one.
1 2 3 4 5 6 7 8 9 10 11 12 13 | ## Not run:
# x is a data.frame
file<-("mydata.xlsx")
a<- 1:10
b<-rep("b",times=10)
c<-rep(1:2,each=5)
x<-data.frame(a,b,c)
excel_export(x,file,table_names="mydata")
# x is a list
y<-list(x,x[2:3])
excel_export(y,file,table_names=c("mydata1","mydata2"))
## End(Not run)
|
Loading required package: gdata
sh: 1: /usr/bin/perl: Permission denied
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLX' (Excel 97-2004) files.
gdata: Unable to load perl libaries needed by read.xls()
gdata: to support 'XLSX' (Excel 2007+) files.
gdata: Run the function 'installXLSXsupport()'
gdata: to automatically download and install the perl
gdata: libaries needed to support Excel XLS and XLSX formats.
Attaching package: ‘gdata’
The following object is masked from ‘package:stats’:
nobs
The following object is masked from ‘package:utils’:
object.size
The following object is masked from ‘package:base’:
startsWith
Loading required package: Hmisc
Loading required package: lattice
Loading required package: survival
Loading required package: Formula
Loading required package: ggplot2
Attaching package: ‘Hmisc’
The following objects are masked from ‘package:base’:
format.pval, units
Loading required package: chron
Loading required package: RODBC
Warning message:
In system(cmd, intern = TRUE) :
running command ''/usr/bin/perl' '/usr/lib/R/site-library/gdata/perl/supportedFormats.pl'' had status 126
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.