[R] Problem in fetching from Oracle
Spencer Graves
spencer.graves at pdf.com
Mon May 12 17:27:48 CEST 2003
1. "xxx" was defined local to the "while" statement and disappeared
after it. Have you tried the following:
xxx <- NULL
while(~dbHasCompleted(rs)){
xxx <- c(xxx, fetch(rs, n=5000)
}
I have not accessed Oracle, so I don't know if this will work. However,
it will solve one problem with your code.
2. "df" is the density function for the F distribution, which is what
you got when you requested it after the "while".
hth. spencer graves
Minghua Yao wrote:
> Dear all,
>
> I tried the following in R:
>
> >library(ROracle)
> >ora <- dbDriver("Oracle")
> >channel <- dbConnect(ora, user = "scott",
> password="tiger",dbname="abcdef")
> >rs <- dbSendQuery(channel, "select * from USArrests")
>
> >while(!dbHasCompleted(rs))
> {
> xxx <- fetch(rs, n = 5000)
> }
> + + + > xxx
> Error: Object "xxx" not found
>
> If I changed xxx to df and typed df, I got
> + + + > df
> function (x, df1, df2, log = FALSE)
> .Internal(df(x, df1, df2, log))
> <environment: namespace:base>
>
>
> Please help. Thanks.
>
> Minghua
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list