Izvedeni paketi
Za MySQL in Oracle sta razvita paketa:
I
RMySQL
I
ROracle
Can't see pdf thumbnails - SDK application service:C# PDF Thumbnail Create SDK: Draw thumbnail images for PDF in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Thumbnail Generation with Various Options for Quick PDF Navigation
www.rasteredge.com
Can't see pdf thumbnails - SDK application service:VB.NET PDF Thumbnail Create SDK: Draw thumbnail images for PDF in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Support Thumbnail Generation with Various Options for Quick PDF Navigation
www.rasteredge.com
RODBC
Note: works only for 32-bit Windows
>
library(RODBC)
>
read.xls <- function(file, ..., sheet = "Sheet1", cch = "#",
+
comment = FALSE, rownames = TRUE, colnames = TRUE) {
+
z <- odbcConnectExcel(file)
+
myframe <- sqlFetch(z, sheet, rownames = rownames,
+
colnames = !colnames, ...)
+
close(z)
+
if(rownames){
+
rownames(myframe) <- myframe[, 1]
+
myframe <- myframe[, -1]
+
}
+
commentLines <- grep(paste("^", cch, sep = ""), rownames(myframe))
+
if (!is.null(commentLines) & length(commentLines) >
+
0 & !comment)
+
myframe <- myframe[-commentLines, ]
+
if (comment)
+
myframe <- rownames(myframe[commentLines, ])
read.xls
> X <- read.xls("../data/bmi.xls",sheet="bmi",rownames=FALSE)
> #head(X)
Reading SPSS les
You can use read.spss() from package foreign
> library(foreign) # you have to install it first!
> X<-read.spss("../data/bmi.sav")
Result X is a list with VARLABELS and VALUELABELS as
attributes:
> attr(X,"variable.labels")
gender
age
"Gender" "Age at measurement"
weight
height
"Weight (kg)"
"Height (m)"
You can convert the list to a data frame:
> Y <- as.data.frame(X)
Reading SPSS les
You can also use spss.get() from package Hmisc
> library(Hmisc) # you have to install it first!
> X<-spss.get("../data/bmi.sav")
Which produces a labeled data frame
> head(X)
gender age weight height
1
Male 17
64.2
1.770
2
Male 17
74.8
1.705
3
Male 17
55.8
1.770
4
Male 17
68.4
1.730
5
Male 17
68.2
1.753
6
Male 17
88.0
1.910
Reading SPSS les
Labels are preserved
> label(X$weight)
weight
"Weight (kg)"
Choosing les interactively
> if(interactive())
+ file.choose()
For more than one le use choose.files()
Write tab delimited tables
> data <- head(X)
> write.table(data,"../data/results.txt",sep="\t")
> write.table(data,"",sep="\t")
"gender" "age" "weight" "height"
"1" "Male" 17 64.2 1.77
"2" "Male" 17 74.8 1.705
"3" "Male" 17 55.8 1.77
"4" "Male" 17 68.4 1.73
"5" "Male" 17 68.2 1.753
"6" "Male" 17 88 1.91
Write tab delimited tables
> write.table(data,"../data/results2.txt",sep="\t",col.names = NA)
> write.table(data,"",sep="\t",col.names = NA)
"" "gender" "age" "weight" "height"
"1" "Male" 17 64.2 1.77
"2" "Male" 17 74.8 1.705
"3" "Male" 17 55.8 1.77
"4" "Male" 17 68.4 1.73
"5" "Male" 17 68.2 1.753
"6" "Male" 17 88 1.91
Writing Excel tables
Package xlsx
> lfn <- "./results2.xls"
> if(file.exists(lfn))
+
file.remove(lfn)
[1] TRUE
> dir(pattern="
*
.xls")
character(0)
> write.xlsx(data,"results2.xls")
> dir(pattern="
*
.xls")
[1] "results2.xls"
Documents you may be interested
Documents you may be interested