[R] Error: OutOfMemoryError (Java): GC overhead limit exceeded

2015-02-02 Thread Yuan, Rebecca
Hello all, When I met this following error message: Error: OutOfMemoryError (Java): GC overhead limit exceeded I usually use the following options to overcome the memory limit: options(java.parameters = -Xmx1024m) # to reduce the error message Error: OutOfMemoryError (Java): GC overhead limit

Re: [R] Error: OutOfMemoryError (Java): GC overhead limit exceeded

2015-02-02 Thread Yuan, Rebecca
Hello Jim, I already use “.xls” for the loading, but still have the memory issue…. Thanks, Rebecca From: jim holtman [mailto:jholt...@gmail.com] Sent: Monday, February 02, 2015 10:21 AM To: Jeff Newmiller Cc: Yuan, Rebecca; R help (r-help@r-project.org) Subject: Re: [R] Error

[R] Error : '.path.package' is defunct.

2014-09-25 Thread Yuan, Rebecca
Hello all, After this reinstallation of R 3.1.1 and Rstudio 0.98.1028, I have the following error messages whenever I tried to load a library to it: library('zoo') Error : '.path.package' is defunct. Use 'path.package' instead. See help(Defunct) Attaching package: 'zoo' The following objects

[R] How to get the adjusted R squared from GLS() estimator

2014-03-13 Thread Yuan, Rebecca
Hello, Although lm() gives a way to get the adjusted R squared by adjr2 - summary(mdl)$adj.r.squared I cannot find a way to extract the adjusted R squared from gls(), any hint? Thanks, Rebecca -- This message, and any

[R] How to get a substring from a string

2014-01-15 Thread Yuan, Rebecca
Hello all, I would like to get a substring (first few characters till ~) from a string I can think of way of doing so by string-'yab~a+b+c' x-substring(string,1,3) x [1] yab But if I do not know the length of the first word before ~ sign, how can I get it out from the whole string?

Re: [R] How to get a substring from a string

2014-01-15 Thread Yuan, Rebecca
This works! Thanks very much! From: Mohammad Tanvir Ahamed [mailto:mashra...@yahoo.com] Sent: Wednesday, January 15, 2014 9:48 AM To: Yuan, Rebecca; R help Subject: Re: [R] How to get a substring from a string Hi ! Try it st-'yab~a+b+c' strsplit(st,~)[[1]][1] Best regards

[R] Format Sys.time()

2014-01-15 Thread Yuan, Rebecca
Hello all, I know that the following code will give me the format of the Sys.time() till hour (%I), how can I get that till min? what shall I add between %I and %p? format(Sys.time(), %Y_%m_%d_%I_%p) Thanks very much! Cheers, Rebecca

Re: [R] Format Sys.time()

2014-01-15 Thread Yuan, Rebecca
Hello Petr, Thanks very much! This works! Cheers, Rebecca -Original Message- From: PIKAL Petr [mailto:petr.pi...@precheza.cz] Sent: Wednesday, January 15, 2014 10:01 AM To: Yuan, Rebecca; R help Subject: RE: Format Sys.time() Hi format(Sys.time(), %Y_%m_%d_%I_%M%p) Petr

Re: [R] How to get a substring from a string

2014-01-15 Thread Yuan, Rebecca
Hello A.K., This gives more flexibility to substract the string, thanks very much! Cheers, Rebecca -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: Wednesday, January 15, 2014 10:43 AM To: R help Cc: Yuan, Rebecca Subject: Re: [R] How to get a substring from

[R] The weak exogeneity test in R for the Error Correction Model?

2013-05-28 Thread Yuan, Rebecca
Hello all, I would like to carry out a single-equation approach of the Error Correction Model such as Delta_y(t) = a + b*y(t-1) + c*x1(t-1) + d*x2(t-1) + e*delta_x1(t) + f*delta_x2(t) + epsilon(t) Where, a, b, c, d, e, f are coefficients to be estimated, y is the dependent variable, and x1,

[R] Can I open an existing pdf file and attach result to it?

2013-04-08 Thread Yuan, Rebecca
Hello all, I would like to attach some results from R to an existing pdf file, can I do that through R? Thanks, Rebecca -- This message, and any attachments, is for the intended r...{{dropped:5}}

[R] error while extracting the p-value from adf.test

2013-03-22 Thread Yuan, Rebecca
Hello all, I tried to extract the p-value from adf.test in tseries; however, I got the error message such as ht=adf.test(list.var$aa) ht$p-value Error in ht$p - value : non-numeric argument to binary operator ht Augmented Dickey-Fuller Test data: list.var$aa Dickey-Fuller =

Re: [R] error while extracting the p-value from adf.test

2013-03-22 Thread Yuan, Rebecca
Hello Sarah, Thanks! I will look into help next time before sending out the question. Thanks, Rebecca -Original Message- From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: Friday, March 22, 2013 10:22 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] error while extracting the p

Re: [R] error while extracting the p-value from adf.test

2013-03-22 Thread Yuan, Rebecca
Hello José, This is a much convenient way of looking at the components! Thanks very much! Cheers, Rebecca -Original Message- From: Jose Iparraguirre [mailto:jose.iparragui...@ageuk.org.uk] Sent: Friday, March 22, 2013 11:25 AM To: Yuan, Rebecca; R help Subject: RE: error while

[R] predict.Arima error 'xreg' and 'newxreg' have different numbers of columns

2013-03-22 Thread Yuan, Rebecca
Hello all, I use arima to fit the model with fit - arima(y, order = c(1,0,1), xreg = list.indep, include.mean = TRUE) and would like to use predict() to forecast: chn.forecast - rep(0,times=num.record) chn.forecast[1] - y[1] for (j in 2:num.record){ indep

Re: [R] How to look at the source code for predict()

2013-03-21 Thread Yuan, Rebecca
Hello Rui, This also works! Thanks so much! Cheers, Rebecca -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: Wednesday, March 20, 2013 3:34 PM To: Yuan, Rebecca Cc: 'R help' Subject: Re: [R] How to look at the source code for predict() Hello, In the case

[R] How to store data frames into pdf file and csv file.

2013-03-21 Thread Yuan, Rebecca
Hello, I have a data frame mdl.summary est.coef std.errt.stat intercept 0.0011625517 0.0002671437 4.351784 aa -0.0813727439 0.0163727943 -4.969997 dummy1 -0.0002534873 0.0001204000 -2.105376

[R] Could I get the following stats from arima()?

2013-03-21 Thread Yuan, Rebecca
Hello all, I use the arima to get a model, i.e. fit = arima(x,order=c(1,0,0)) and I know I can get the following from fit via est.coef = coef(fig) est.aic = fit$aic std.err = sqrt(diag(vcov(fit))) t.stat = est.coef/std.err

Re: [R] How to store data frames into pdf file and csv file.

2013-03-21 Thread Yuan, Rebecca
,collapse='\n'),family='mono') dev.off() I believe this time we try to use pdf to catch the graph via text, are we? Thanks, Rebecca From: jim holtman [mailto:jholt...@gmail.com] Sent: Thursday, March 21, 2013 9:44 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] How to store data

[R] How could I specify no interception term in arima?

2013-03-21 Thread Yuan, Rebecca
Hello, I cannot find it in ?arima, does someone know how to specify no interception term in arima? Thanks, Rebecca -- This message, and any attachments, is for the intended r...{{dropped:5}}

Re: [R] How to store data frames into pdf file and csv file.

2013-03-21 Thread Yuan, Rebecca
Hello Jim, This graphics.off() helps me to release the previous pdf file that was had the error message. Thanks again for your help! Cheers, Rebecca From: jim holtman [mailto:jholt...@gmail.com] Sent: Thursday, March 21, 2013 10:07 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] How to store

Re: [R] How to store data frames into pdf file and csv file.

2013-03-21 Thread Yuan, Rebecca
Hello Jim, Thanks very much! This time I am able to get the pdf file. Best regards, Rebecca From: jim holtman [mailto:jholt...@gmail.com] Sent: Thursday, March 21, 2013 10:04 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] How to store data frames into pdf file and csv file. Here

[R] easy way of paste

2013-03-21 Thread Yuan, Rebecca
Hello, Is there a better way to use paste such as: a = paste(colnames(list.indep)[1],colnames(list.indep)[2],colnames(list.indep)[3],colnames(list.indep)[4],colnames(list.indep)[5],sep=+) a [1] aa+dummy1+dummy2+bb+cc I tried a = paste(colnames(list.indep)[1:5],sep=+) a [1] aa

Re: [R] easy way of paste

2013-03-21 Thread Yuan, Rebecca
Hello Sarah, Yes, that is what I want. Thanks! Cheers, Rebecca -Original Message- From: Sarah Goslee [mailto:sarah.gos...@gmail.com] Sent: Thursday, March 21, 2013 11:21 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] easy way of paste It looks like you want collapse rather than

Re: [R] easy way of paste

2013-03-21 Thread Yuan, Rebecca
Hello A.K., Thanks! I use collapse instead of sep and get the answer. Cheers, Rebecca -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: Thursday, March 21, 2013 11:21 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] easy way of paste  dat2-as.data.frame(matrix(1:20

Re: [R] How could I specify no interception term in arima?

2013-03-21 Thread Yuan, Rebecca
Hello Rui, Thanks! I get it now. Should have read the documentation carefully! Cheers, Rebecca -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: Thursday, March 21, 2013 2:46 PM To: Yuan, Rebecca Cc: R help Subject: Re: [R] How could I specify no interception

[R] How to look at the source code for predict()

2013-03-20 Thread Yuan, Rebecca
Hello, I try to look at the source code of predict() it turns out that I cannot find it. I can see it with debug(library), but not efficient. Can someone help? Thanks, Rebecca -- This message, and any attachments, is for

Re: [R] How to get the t-stat for arima()?

2013-03-20 Thread Yuan, Rebecca
Hello Rui, Thanks very much! This works! Cheers, Rebecca -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: Tuesday, March 19, 2013 6:26 PM To: Yuan, Rebecca Cc: R help Subject: Re: [R] How to get the t-stat for arima()? Hello, Sorry for the error, the sqrt(n

Re: [R] How to look at the source code for predict()

2013-03-20 Thread Yuan, Rebecca
Hello all, I thought I found it, it is in the arima.R if I use arima to fit the model. But how could we see the source code of some function in R? Thanks, Rebecca From: Yuan, Rebecca Sent: Wednesday, March 20, 2013 2:38 PM To: R help Subject: How to look at the source code for predict

Re: [R] How to look at the source code for predict()

2013-03-20 Thread Yuan, Rebecca
Hello MW, Thanks very much! I use getS3method(predict,arima0) And be able to see the source code. Have a great day! Cheers, Rebecca -Original Message- From: R. Michael Weylandt [mailto:michael.weyla...@gmail.com] Sent: Wednesday, March 20, 2013 2:52 PM To: Yuan, Rebecca Cc: R

Re: [R] How to look at the source code for predict()

2013-03-20 Thread Yuan, Rebecca
Hello Duncan, Thanks for this link! A very good article that has useful information! Best, Rebecca -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Wednesday, March 20, 2013 2:53 PM To: Yuan, Rebecca Cc: 'R help' Subject: Re: [R] How to look

[R] How to get the t-stat for arima()?

2013-03-19 Thread Yuan, Rebecca
Hello all, fit = arima() and Summary(fit) will give some summary of the fit. However, the t-stats are not shown in the summary. How can I get the t-stats of it? Thanks, Rebecca -- This message, and any attachments, is for the

[R] To convert a quarterly data to a monthly data.

2013-02-20 Thread Yuan, Rebecca
Hello, I have a data set has 2001Q1 100 2001Q2 101 2001Q3 120 2001Q4 103 ... And would like to convert it to a monthly data. i.e. 200101

Re: [R] To convert a quarterly data to a monthly data.

2013-02-20 Thread Yuan, Rebecca
, February and March. All you know is that these values sum to 100. cheers, Rolf Turner On 02/21/2013 08:15 AM, Yuan, Rebecca wrote: Hello, I have a data set has 2001Q1 100 2001Q2 101 2001Q3

[R] Range difference of plot two arrays in one plot

2013-02-01 Thread Yuan, Rebecca
Hello all, When I tried to plot the following two arrays in one figure with the following: x = c(0,0,0,10,20,30) y = c(40,50,60,70,80,90) plot(x, type='o', ylim=c(min(x),max(x))) par(new=T) plot(y, type='l', ylim=c(min(y),max(y))) Found that the first points and last points from those two

Re: [R] Range difference of plot two arrays in one plot

2013-02-01 Thread Yuan, Rebecca
[mailto:dwinsem...@comcast.net] Sent: Friday, February 01, 2013 11:39 AM To: Yuan, Rebecca Subject: Re: [R] Range difference of plot two arrays in one plot On Feb 1, 2013, at 10:28 AM, Yuan, Rebecca wrote: Hello all, When I tried to plot the following two arrays in one figure with the following

[R] fSeries not found in R

2013-01-30 Thread Yuan, Rebecca
Hello all, When I tried to install fSeries in R, I got the following error messages: install.packages(fSeries,dependencies=T) Warning message: package 'fSeries' is not available (for R version 2.15.2) Is this package changing/merging to another package? Thanks, Rebecca

[R] to check if a character string is in a group of character strings

2013-01-23 Thread Yuan, Rebecca
Hello, How can I judge if a string is in a group of string? For example, I would like to have if (subpool in pool){ }else{ } Where pool = c(s1,s2) subpool = c(s1) How can I write the subpool in pool right in R? Thanks very much! Cheers, Rebecca

Re: [R] to check if a character string is in a group of character strings

2013-01-23 Thread Yuan, Rebecca
Hello Duncan, Thanks for this! This works! Best, Rebecca -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Wednesday, January 23, 2013 11:23 AM To: Yuan, Rebecca Cc: R help Subject: Re: [R] to check if a character string is in a group of character

Re: [R] A smart way to use $ in data frame

2013-01-22 Thread Yuan, Rebecca
Hello Greg, Thanks very much! This helps! Cheers, Rebecca From: Greg Snow [mailto:538...@gmail.com] Sent: Friday, January 18, 2013 5:17 PM To: Yuan, Rebecca Cc: R help Subject: Re: [R] A smart way to use $ in data frame The important thing to understand is that $ is a shortcut for [[ and you

[R] plot two time series with different length and different starting point in one figure.

2013-01-22 Thread Yuan, Rebecca
Hello, I do have two different time series A and B, they are different in length and starting point. A starts in Jan, 2012 and ends in Dec, 2012 and B starts in March, 2012 and ends in Nov, 2012. How can I plot those two series A and B in the same plot? I.E., from Jan. 2012 - Feb, 2012, it

Re: [R] plot two time series with different length and different starting point in one figure.

2013-01-22 Thread Yuan, Rebecca
) To plot A and B in one plot is to compare the difference between them... Any other thoughts? Thanks, Rebecca -Original Message- From: PIKAL Petr [mailto:petr.pi...@precheza.cz] Sent: Tuesday, January 22, 2013 10:28 AM To: Yuan, Rebecca; R

Re: [R] plot two time series with different length and different starting point in one figure.

2013-01-22 Thread Yuan, Rebecca
To: Yuan, Rebecca Cc: R help Subject: Re: [R] plot two time series with different length and different starting point in one figure. Hi Rebecca, Assuming that 'raw_data' is data.frame with first column as raw_time: You could convert the raw_time to date format by  as.Date(28FEB2002,format=%d%B%Y

Re: [R] plot two time series with different length and different starting point in one figure.

2013-01-22 Thread Yuan, Rebecca
it. Thanks, Rebecca -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Tuesday, January 22, 2013 2:34 PM To: Yuan, Rebecca Cc: R help Subject: Re: [R] plot two time series with different length and different starting point in one figure. On Jan 22, 2013, at 7

Re: [R] plot two time series with different length and different starting point in one figure.

2013-01-22 Thread Yuan, Rebecca
[mailto:smartpink...@yahoo.com] Sent: Tuesday, January 22, 2013 5:06 PM To: Yuan, Rebecca Cc: R help Subject: Re: [R] plot two time series with different length and different starting point in one figure. HI Rebecca, Try this: dateA-seq.Date(as.Date(28JAN2012,format=%d%B%Y),as.Date(28DEC2012,format=%d%B

[R] A smart way to use $ in data frame

2013-01-18 Thread Yuan, Rebecca
Hello all, I have a data frame dataa: newdate newstate newid newbalance newaccounts 1 31DEC2001AR 1 1170 61 2 31DEC2001VA 2 4565 54 3 31DEC2001WA 3 2726 35 4 31DEC2001

[R] How to cut the time format short

2013-01-16 Thread Yuan, Rebecca
Hello all, I have a time format looks like 31JAN2002:00:00:00.000 How could I cut it to 31JAN2002 ? I tried with format() but not work. Thanks, Rebecca -- This message, and any attachments, is for the intended

Re: [R] How to cut the time format short

2013-01-16 Thread Yuan, Rebecca
Hello Ellison, Thanks very much! I use the substr() and it works! Have a great day! Cheers, Rebecca -Original Message- From: S Ellison [mailto:s.elli...@lgcgroup.com] Sent: Wednesday, January 16, 2013 1:35 PM To: Yuan, Rebecca; R help Subject: RE: How to cut the time format short

Re: [R] suggestions about import SAS results to R.

2013-01-03 Thread Yuan, Rebecca
labels, etc. Frank Ista Zahn wrote Well it was worth a try. If you haven't solved the problem some other way I suggest exporting from SAS to a plain text format like .csv and read into R with read.table. Best, Ista On Wed, Jan 2, 2013 at 5:44 PM, Yuan, Rebecca lt; rebecca.yuan@ gt

Re: [R] Read many cvs files

2013-01-02 Thread Yuan, Rebecca
I know that R can read cvs file, but could R read excel files? For example, in the workbook, I have 3 sheets. How could I read for those three sheets? Thanks, Rebecca -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jim

[R] suggestions about import SAS results to R.

2013-01-02 Thread Yuan, Rebecca
Hello all, I have got some data in SAS, and I export it to one excel workbook with multiple sheets, for example, each sheet has the sales information for each state. Then I need to use R to do plotting, analysis on those sales data, where I need to load the data from excel to R. When I read

Re: [R] suggestions about import SAS results to R.

2013-01-02 Thread Yuan, Rebecca
Message- From: mehmet.su...@gmail.com [mailto:mehmet.su...@gmail.com] On Behalf Of Suzen, Mehmet Sent: Wednesday, January 02, 2013 4:14 PM To: David Winsemius Cc: Yuan, Rebecca; R help; sa...@listserv.uga.edu Subject: Re: [R] suggestions about import SAS results to R. On Jan 2, 2013, at 12:37

Re: [R] suggestions about import SAS results to R.

2013-01-02 Thread Yuan, Rebecca
-Original Message- From: Ista Zahn [mailto:istaz...@gmail.com] Sent: Wednesday, January 02, 2013 5:25 PM To: Yuan, Rebecca Cc: R help; sa...@listserv.uga.edu Subject: Re: [R] suggestions about import SAS results to R. Hi Rebecca, I've had success with the sas7bdat package ( http://cran.r