Re: [R] assignment by value or reference

2010-09-15 Thread Xiaobo Gu
Thanks. Xiaobo.Gu >>-Original Message- >>From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] >>Sent: Wednesday, September 15, 2010 5:06 PM >>To: Xiaobo Gu >>Cc: r-help@r-project.org; '顾小波' >>Subject: Re: [R] assignment by value o

[R] ff objects saving problem

2010-11-10 Thread Xiaobo Gu
Hi, I am running the examples in page 70 of the ff package document, but it failed with the following error > cat("let's create some ff objects\n") let's create some ff objects > n <- 8e3 > a <- ff(sample(n, n, TRUE), vmode="integer", length=n, filename="d:/tmp/a.ff") > b <- ff(sample(255,

Re: [R] ff objects saving problem

2010-11-10 Thread Xiaobo Gu
Hi Jens, I have installed RTools, on my Win XP SP3 notebook, there are still errors when running the examples, > cat("let's create some ff objects\n") let's create some ff objects > n <- 8e3 > a <- ff(sample(n, n, TRUE), vmode="integer", length=n, filename="d:/tmp/a.ff") > b <- ff(sample(255, n,

[R] How to remove directory?

2010-11-12 Thread Xiaobo Gu
Hi, It seems file.remove can't remove directories, regardless whether it's an empty one, but how to delete a directory in R > file.remove("D:/ffdata") [1] FALSE Warning message: In file.remove("D:/ffdata") : cannot remove file 'D:/ffdata', r

[R] R encoding question

2010-11-24 Thread Xiaobo Gu
a2 2 2 瑕�� EURO\xa1 I see the following option, do I need to change the encoding option to show the corresponding texts? In my case how to set? $encoding [1] "native.enc" Thanks, Xiaobo Gu __ R-help@r-project.org mailing list https://st

Re: [R] FW: R encoding question

2010-11-29 Thread Xiaobo Gu
But Sys.setlocale tries to change the option of the whole OS, I just want only R to use a specified encoding, how can I do this. Xiaobo.Gu >>-Original Message- >>From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] >>Sent: Monday, November 29, 2010 8:57

Re: [R] FW: R encoding question

2010-11-30 Thread Xiaobo Gu
Do you know what values should I set to the category and locale parameters in order to use UTF-8 encoding in a Chinese Windows XP SP3 environment? Sys.setlocale(category = "LC_ALL", locale = "") Xiaobo Gu >>-Original Message- >>From: Gabor Grothendieck

Re: [R] FW: R encoding question

2010-11-30 Thread Xiaobo Gu
But locale "Chinese" will use GBK encoding by default, how to use UTF-8 encoding I have tried the following, neither of them works. Sys.setlocale(locale = "zh_CN.UTF-8") Sys.setlocale(category = "LC_CTYPE", locale= "zh_CN.UTF-8") Xiaobo Gu &g

Re: [R] FW: R encoding question

2010-11-30 Thread Xiaobo Gu
gt; df <- dbGetQuery(con, "select * from test") > df a b 1 1 椤惧皬娉\xa2 2 2 瑕冩€\xa1 > On Tue, Nov 30, 2010 at 10:25 PM, Gabor Grothendieck wrote: > On Tue, Nov 30, 2010 at 9:09 AM, Xiaobo Gu wrote: >> But locale "Chinese" will use

[R] How to specify ff object filepaths when reading a CSV file into a ff data frame.

2010-12-24 Thread Xiaobo Gu
t element will be used 5: In if (is.na(filesize)) stop("unable to open file") : the condition has length > 1 and only the first element will be used My questions are: 1. What's the datatype of the col_args parameter of the as.ffdf function 2. If I can make layout of the asffdf_a

Re: [R] How to specify ff object filepaths when reading a CSV file into a ff data frame.

2010-12-26 Thread Xiaobo Gu
rtual mapping PhysicalName VirtualVmode PhysicalVmode AsIs VirtualIsMatrix PhysicalIsMatrix PhysicalElementNo PhysicalFirstCol PhysicalLastCol PhysicalIsOpen col1 col1 integer integer FALSE FALSE FALSE 11 1 TRUE ffdf

Re: [R] How to create ff objects from database connection

2010-08-04 Thread Xiaobo Gu
Hi, I am sorry for that I can’t determine which R-sig list to post questions about package ff. Now I have made a little progress with this: read.dbres.ffdf <- function( res){ data1 <- fetch(res, 0) if (nrow(data1) == 0){

[R] assignment by value or reference

2010-09-05 Thread Xiaobo Gu
Hi Team, Can you please tell me the rules of assignment in R, by value or by reference. >From my about 3 months of experience of part time job of R, it seems most >times it is by value, especially in function parameter and return values >assignment; and it is by reference when referen

[R] Does anyone running the latest version of R on IBM AIX 5.3?

2011-06-03 Thread Xiaobo Gu
Because the major processing of R is single threaded, I think computers such as IBM P servers with higher CPU Clock Speed will achieve better performance. Regards, Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] How to assess the accuracy of fitted logistic regression using glm

2011-06-06 Thread Xiaobo Gu
rule of thumb to exam the fitted model from the practical perspective. Regards, Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

Re: [R] How to assess the accuracy of fitted logistic regression using glm

2011-06-09 Thread Xiaobo Gu
ormance of the fitted model, here what's the difference between and "Deviance Residuals" and "Residual deviance"? 3. How to compare "Null deviance" and "Residual deviance"? 4. What does AIC mean, and how to use this measure? 5. What does the Signif. c

Re: [R] assignment by value or reference

2011-03-08 Thread Xiaobo Gu
e", df) will write the content of data frame df into a database table, will a new data frame object created and used inside the dbWriteTable function? Thanks. > > Uwe Ligges > > > > On 05.09.2010 17:19, Xiaobo Gu wrote: >> >> Hi Team, >> >>      

Re: [R] assignment by value or reference

2011-03-08 Thread Xiaobo Gu
e", df) will write the content of data frame df into a database table, will a new data frame object created and used inside the dbWriteTable function? Thanks. > > Uwe Ligges > > > > On 05.09.2010 17:19, Xiaobo Gu wrote: >> >> Hi Team, >> >>      

[R] No response after click the "show Rules" button on Tab "Associate".

2011-03-09 Thread Xiaobo Gu
== Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] No response after click the "show Rules" button on Tab "Associate".

2011-03-11 Thread Xiaobo Gu
quot;, I have attached the little dataset used to do the test. Another question, why the confidence of the rules are all 1 ? > > Regards, > Graham > > > > > On 10 March 2011 02:07, Xiaobo Gu wrote: >> Hi, >> I am using Rattle 2.6.4 with R 2.12.2 on win64, is this a b

Re: [R] No response after click the "show Rules" button on Tab "Associate".

2011-03-11 Thread Xiaobo Gu
On Sat, Mar 12, 2011 at 10:02 AM, Graham Williams wrote: > On 12 March 2011 00:07, Xiaobo Gu wrote: >> On Fri, Mar 11, 2011 at 2:55 AM, Graham Williams >> wrote: >>> Did you scroll down the window to see the rules? >> OK, it takes a long time for rattle to show

[R] Does RHIPE support running complex mining models in on top of Hadoop?

2011-03-25 Thread Xiaobo Gu
Such as logistic regression, decision trees. Or is that RHIPE only support MapReduce style algorithms. Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] write.arff function in package foreign can't handle Date time

2011-11-19 Thread Xiaobo Gu
.arff") Content of ddf.arff is @relation ddf @attribute x numeric @attribute y {'1','2'} @data 2011-01-01,'1' 2012-01-01,'2' Here x is of type Date, but write.arff write it as numeric, but the actual content is string, the result file is not with

[R] as.factor does not work inside function

2011-12-10 Thread Xiaobo Gu
FALSE But if I call this in R console directlly, it works for(col in c("x","y")){df[[col]] <- as.factor(df[[col]])} is.factor(df[["x]]) FALSE Regards, Xiaobo Gu __ R-help@r-project.org mailing list https://stat.et

Re: [R] as.factor does not work inside function

2011-12-10 Thread Xiaobo Gu
I am sorry, it is for(col in c("x","y")){df[[col]] <- as.factor(df[[col]])} is.factor(df[["x]]) TRUE On Sun, Dec 11, 2011 at 10:06 AM, Xiaobo Gu wrote: > Hi, > > I am trying to write a function do cast columns of data frame as > factor in a lo

Re: [R] as.factor does not work inside function

2011-12-10 Thread Xiaobo Gu
] <- as.factor(df[[col]]) } } df } > df <- as.factor.loop(df, c("x","y")) > is.factor(df[["y"]]) [1] TRUE Thanks. Xiaobo Gu On Sun, Dec 11, 2011 at 10:23 AM, Joshua Wiley wrote: > Hi Xiaobo, > > The problem is that your function is not assigni

[R] incomplete final line found warning

2011-12-10 Thread Xiaobo Gu
] <- as.factor(df[[col]]) } } df } And got this warning message, > source('D:/ambertuil.r') Warning message: In readLines(file) : incomplete final line found on 'D:/ambertuil.r' Can you help with this? Regards, Xiaobo Gu __

Re: [R] incomplete final line found warning

2011-12-11 Thread Xiaobo Gu
On Sun, Dec 11, 2011 at 5:03 PM, Prof Brian Ripley wrote: > On Sun, 11 Dec 2011, David Winsemius wrote: > >> >> On Dec 10, 2011, at 10:01 PM, Xiaobo Gu wrote: > > > without following the posting guide in several respects and hence leaving us > guessing &

[R] Question about escapes character in args parameter of the system2 function.

2011-12-14 Thread Xiaobo Gu
uot; copycmd <- "-c \"\\copy demo.store to 'd:\\store.csv' with csv header\"" args <- c("-h", gphost, "-U", gpuser, "-w", "-d", gpdb, copycmd ) system2(psql, args) And the return value of system2 function is 127. Reg

[R] Where to download the splines package.

2012-01-08 Thread Xiaobo Gu
Hi, install.packages("splines") Warning in install.packages : package ‘splines’ is not available (for R version 2.14.1) Regards, Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE d

Re: [R] Where to download the splines package.

2012-01-09 Thread Xiaobo Gu
Thanks, reinstalling R 2.14.1 fixes this problem. On Mon, Jan 9, 2012 at 8:31 PM, Duncan Murdoch wrote: > > On 12-01-08 9:56 PM, Xiaobo Gu wrote: >> >> Hi, >> >> install.packages("splines") >> >> Warning in install.packages : >>

[R] How to adjust the stack size of R

2012-03-29 Thread Xiaobo Gu
Hi, I got a stack overflow error when training a glm model with a very long formula. Regards, Xiaobo Gu [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] How to adjust the stack size of R

2012-03-31 Thread Xiaobo Gu
2012/3/31 Uwe Ligges > > > On 30.03.2012 03:16, Xiaobo Gu wrote: > >> Hi, >> >> I got a stack overflow error when training a glm model with a very long >> formula. >> > > I just tried with a formula of length 1000. How long was yours? > Whi

Re: [R] How to adjust the stack size of R

2012-04-01 Thread Xiaobo Gu
ve really big machines around. We do have big machines, but we don't have more obs for this data, so we will revise the algorithm to try less combinations data set size. Regards, Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/

Re: [R] How to adjust the stack size of R

2012-04-02 Thread Xiaobo Gu
ted, and your OS documentation will tell you how to >increase it. We are running R on Windows 7 64bit Home basic and Windows Server 2003 64bit Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

[R] What does the : operator mean in glm formulas

2012-01-19 Thread Xiaobo Gu
rds, Xiaobo Gu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] What does the : operator mean in glm formulas

2012-01-19 Thread Xiaobo Gu
n of all the variables and factors >appearing in the term. What does interaction mean, and what does term mean here ? Xiaobo Gu From: David Winsemius Date: 2012-01-19 21:46 To: guxiaobo1982 CC: r-help; ds5j Subject: Re: [R] What does the : operator mean in glm formulas On Jan 19, 2012, at 8:0