Re: [R] R help

2014-03-20 Thread arun
Hi, Another way would be: dat11 -  transform(dat[rep(1:nrow(dat),each=12),1:2], weekdatesunday=rep(0:11,3), RevenueWeekN00=as.vector(t(dat[,-c(1:2)]))) row.names(dat11) - 1:nrow(dat11)   dat22 - unsplit(lapply(split(dat11, with(dat11,list(customer_id,CountryName)),drop=TRUE),function(x) {m1 -

Re: [R] R help

2014-03-20 Thread arun
Hi, It is better to use ?dput() to show the data.dput(dataset) dat - structure(list(customer_id = c(8L, 33L, 12L), CountryName = c(US, CA, UK), RevenueWeekN00 = c(2.28, 0, 30.18), RevenueWeekN01 = c(9.57, 14.69, 43.9), RevenueWeekN02 = c(7.54, 3.31, 90.4), RevenueWeekN03 = c(8.99, 5.21, 45),

Re: [R] R Help

2014-03-11 Thread David McPearson
On Mon, 10 Mar 2014 18:26:38 + William Dunlap wdun...@tibco.com wrote You probably want to read the Introduction to R that comes with R (menu: HelpManuals (in PDF)Introduction to R). When I first started using R I found it easier to work through some of the contributed documentation.

Re: [R] R Help

2014-03-10 Thread Pascal Oettli
Hello, And what are you expecting the command setwd to do? Regards, Pascal On Mon, Mar 10, 2014 at 5:59 PM, Jon Nash jon.n...@hvhs.school.nz wrote: I have just installed R 3.0.3 on Windows 7. I open up the GUI and type setwd(c:/users/jon) and press return. Nothing happens, Ive tried

Re: [R] R Help

2014-03-10 Thread Rui Barradas
Hello, The function setwd returns the previous working directory invisibly so nothing happens might mean that there is no apparent feedback. You can see if it changed the wd with getwd(). Hope this helps, Rui Barradas Em 10-03-2014 10:58, Pascal Oettli escreveu: Hello, And what are you

Re: [R] R Help

2014-03-10 Thread William Dunlap
I open up the GUI and type setwd(c:/users/jon) and press return. Nothing happens Does nothing happens mean that R does not even print , prompting you to enter more input? Did you get such a prompt before typing setwd(...)? What does typing 5:2 cause R to do? Bill Dunlap TIBCO Software

Re: [R] R Help

2014-03-10 Thread William Dunlap
Software wdunlap tibco.com From: Jon Nash [mailto:jon.n...@hvhs.school.nz] Sent: Monday, March 10, 2014 11:14 AM To: William Dunlap Subject: Re: [R] R Help Hi Bill, I start with a prompt I type the command in the syntax that appears to be correct I immediately get a prompt back I type getwd and get

Re: [R] R Help

2014-03-10 Thread Rui Barradas
Hello, It's better to keep this on the list, the odds of getting more and better answers are greater. You need to type getwd() with the parenthesis and no arguments. It always returns something (the current wd). Rui Barradas Em 10-03-2014 18:00, Jon Nash escreveu: Hi Rui, Nothing of value

Re: [R] R help

2014-03-06 Thread arun
Hi, If there are multiple max values, you will get only the first value with ?which.max(). Using dataset `a` as an example: a - structure(list(`1` = c(Mal, Mahesh, Tarak, Pawan, Charan, Prabhas, Arjun, Naresh, Nithin, Puri), `2` = 1:10,     `3` = c(Layer, Actor, Actor, Actor, Actor, Actor,   

Re: [R] R help table from HTML

2014-02-26 Thread arun
Hi, Check the ?str() of my.table. library(XML) u='http://www.ininternet.org/calorie.htm' tables1 = readHTMLTable(u) my.table1=tables1[[9]]  with(my.table1,mean(PROTEINE)) #[1] NA #Warning message: #In mean.default(PROTEINE) : #  argument is not numeric or logical: returning NA  str(my.table1)

Re: [R] R-Help. Error in file(file, ifelse(append, a, w)). No connection.

2014-02-17 Thread David Winsemius
On Feb 16, 2014, at 11:54 PM, Michał Wajszczuk wrote: Hi, I just download R and R-studio. I have one problem and i can't make through it. I'm trying to use help function in R-studio but after typing something, error appears. I already searched in web and asked my friends but no one can

Re: [R] R help

2014-02-11 Thread arun
Hi, My solution was based on the input dataset you showed.  If xy@12_g.com is xy1...@gmail.com (or both of them exist in the dataset??  Not clear!)., then try: dat - read.table(text=Emails  mal...@gmail.com mah...@gmail.com x...@gmail.com ravi_...@yahoo.com lavk@rediff.com

Re: [R] R help

2014-02-07 Thread arun
Hi, YOu could use ?cut().  dat2 - read.table(text=1    2   Mal    1 Ram    1000 Ramesh  12344,sep=,header=TRUE,stringsAsFactors=FALSE,check.names=FALSE) res - setNames(as.data.frame(table(cut(dat2[,2],breaks=c(0,1000,10),labels=c(0-1000,1000-10,c(Bins,count))  res #

Re: [R] R help

2014-02-07 Thread arun
Hi, The pattern is not very clear.  Try: dat - read.table(text=Emails mal...@gmail.com mah...@gmail.com x...@gmail.com ravi_...@yahoo.com lavk@rediff.com xy@12_g.com,sep=,header=TRUE,stringsAsFactors=FALSE)  vec1 - gsub(\\.[[:alnum:]]+$,,gsub(^([[:alpha:]]+)(\\d+.*),\\1_\\2,dat$Emails))

Re: [R] R help

2014-02-07 Thread arun
Hi, If there are multiple max values, you will get only the first value with ?which.max(). Using dataset `a` as an example: a - structure(list(`1` = c(Mal, Mahesh, Tarak, Pawan, Charan, Prabhas, Arjun, Naresh, Nithin, Puri), `2` = 1:10,     `3` = c(Layer, Actor, Actor, Actor, Actor, Actor,  

Re: [R] R help

2014-02-06 Thread arun
HI, I am not sure this is what you meant. a - read.table(text=1  2    3    4  5  6 1    Mal  1  Layer  22  M    10 2  Mahesh  2  Actor  45  M 15000 3  Tarak  3  Actor  30  M 15000 4  Pawan  4  Actor  47  M

Re: [R] R help

2014-02-06 Thread arun
Hi, Try: dat - read.table(text=Emails mal...@gmail.com mah...@gmail.com x...@gmail.com ravi_...@yahoo.com lavk@rediff.com xy@12_g.com,sep=,header=TRUE,stringsAsFactors=FALSE)  vec1 - gsub(\\.[[:alnum:]]+$,,gsub(^([[:alpha:]]+)(\\d+.*),\\1_\\2,dat$Emails)) indx1 -

Re: [R] R help

2014-02-05 Thread arun
Hi, May be this helps: dat - read.table(text=Emails mal...@gmail.com mah...@gmail.com ravi_...@yahoo.com lavk@rediff.com,sep=,header=TRUE,stringsAsFactors=FALSE)  

Re: [R] R help

2014-02-05 Thread arun
Hi, If you have .edu, .gov etc. dat - structure(list(Emails = c(mal...@gmail.com, mah...@gmail.com, ravi_...@yahoo.com, lavk@ufl.edu)), .Names = Emails, class = data.frame, row.names = c(NA, -4L)) res -

Re: [R] R-help Digest, Vol 131, Issue 15

2014-01-14 Thread Vasco Cadavez
Dear R Users, I'm searching for a Self Start function for Weibull function (3 parameters). Somebody can help? Cheers, Vasco Cadavez On 14/01/14 11:00, r-help-requ...@r-project.org wrote: Send R-help mailing list submissions to r-help@r-project.org To subscribe or unsubscribe

Re: [R] R-help Digest, Vol 131, Issue 15

2014-01-14 Thread Rui Barradas
Hello, Maybe function ?SSweibull in package stats. Hope this helps, Rui Barradas Em 14-01-2014 18:29, Vasco Cadavez escreveu: Dear R Users, I'm searching for a Self Start function for Weibull function (3 parameters). Somebody can help? Cheers, Vasco Cadavez On 14/01/14 11:00,

Re: [R] R-help Digest, Vol 131, Issue 15

2014-01-14 Thread David Winsemius
On Jan 14, 2014, at 10:29 AM, Vasco Cadavez wrote: Dear R Users, I'm searching for a Self Start function for Weibull function (3 parameters). Have you looked at: ?selfStart # be sure to look at the links in the See Also section -- David Somebody can help? Cheers, Vasco

Re: [R] R-help Digest, Vol 129, Issue 15

2013-11-15 Thread Kamil Bartoń
works ok with mock-up data. Can you give some code to reproduce this error? kamil On 2013-11-15 11:00, r-help-requ...@r-project.org wrote: Message: 56 Date: Thu, 14 Nov 2013 18:01:27 -0800 From: Lilly Dethierlillydeth...@gmail.com To:r-help@r-project.org Subject: [R] Error in MuMIn models

Re: [R] R help-classification accuracy of DFA and RF using caret

2013-11-06 Thread David Winsemius
On Nov 6, 2013, at 10:07 AM, Henderson, Robin Michelle wrote: Hi, I am a graduate student applying published R scripts to compare the classification accuracy of 2 predictive models, one built using discriminant function analysis and one using random forests (webpage link for these

Re: [R] R help-classification accuracy of DFA and RF using caret

2013-11-06 Thread Rolf Turner
On 11/07/13 10:57, David Winsemius wrote: SNIP I think you need to add a statistician to your committee. The difficulties you are facing (of which you appear to be unaware) are not just related to being new to R. SNIP Fortune? cheers, Rolf

Re: [R] R help-classification accuracy of DFA and RF using caret

2013-11-06 Thread Bert Gunter
Second (perhaps with the slight addition indicated) -- Bert ... And **amen!** to the sentiment expressed. On Wed, Nov 6, 2013 at 2:08 PM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 11/07/13 10:57, David Winsemius wrote: SNIP I think you need to add a statistician to your [PhD]

Re: [R] R-help Digest, Vol 128, Issue 30

2013-10-28 Thread Lorenz, David
Pavlos, There are several ways to evaluate how well new data fit an old regression.Part of the answer depends on what you are concerned about. For example, if you are concerned about bias, you can test whether the mean of the new data is within the expected range of the mean of that many new

Re: [R] R-help Digest, Vol 128, Issue 29

2013-10-27 Thread Robert Rigby
Re: Heteroscedasticity and mgcv. (Collin Lynch) The GAMLSS package can model heterogeneity in the scale parameter (e.g. standard deviastion) [and also heterogeity in skewness and kurtosis parameters].of the response variable distribution. For parametric models a generalized likelihood ratio

Re: [R] R-help Digest, Vol 128, Issue 22

2013-10-21 Thread Mark Leeds
hi john. I knew it wasn't that simple and was thinking of asking you to comment. so thanks for commenting. any good references are appreciated also. In the various texts I have, this issue is seldom talked about. On Mon, Oct 21, 2013 at 8:43 AM, Prof J C Nash (U30A) nas...@uottawa.cawrote:

Re: [R] R help

2013-10-14 Thread Jeff Newmiller
Why? I assume you posted because you want help with something, but it is going to be very difficult to help if you don't know the most basic things about R or this mailing list. Spreadsheet: R can import data from a spreadsheet, but the corresponding native terminology in R is data.frame or

Re: [R] R Help-Implicit loop-lapply

2013-10-14 Thread arun
Hi,The conditions are not very clear. set.seed(285)  RN - sample(1:100,20,replace=FALSE) aList - lapply(1:10,function(i) sample(RN,i,replace=FALSE))  sapply(aList,tail,1) # [1] 87 60 96 87 60 67 42 96 73 24 A.K. I was wondering if I could obtain some help on how to do this. I feel as if

Re: [R] R Help-how to use sapply w/tapply

2013-10-14 Thread arun
Hi, (Please use ?dput() to share the example dataset. Avoid using images to show dataset. Also, please read the posting guide esp. regarding home work, assignments etc.) res - sapply(Gene[,-1],function(x) tapply(x,list(Gene$Genotype),mean)) #or res2 -  aggregate(.~Genotype, data=Gene,mean)

Re: [R] R Help-how to use sapply w/tapply

2013-10-14 Thread arun
Hi, Try: Gene[,-1] - lapply(Gene[,-1],function(x) {x[sample(length(x),1)] - NA;x}) A.K. I got it guys MeanofGenotype -sapply(2:8, function(k) tapply(Gene[,k] , Gene$Genotype, mean)) I was wondering if now you guys can help me on how to insert a random NA to each column. The question is

Re: [R] R-help Digest, Vol 128, Issue 5

2013-10-04 Thread TAPO (Thomas Agersten Poulsen)
Hi Peter, The ssconvert tool (part of gnumeric) is very good at converting spreadsheets to csv-files. There is a wrapper in the gnumeric package on cran. Cheers, Thomas Date: Fri, 4 Oct 2013 09:08:50 +0100 From: Barry Rowlingson b.rowling...@lancaster.ac.uk To: Peter Maclean

Re: [R] R Help

2013-09-05 Thread Pascal Oettli
Hello, Please stop to use R help for the subject of your mail. You already used it several times. You have been asked to stop to send e-mail in HTML. You also have been asked to use dput() when you want to submit data to this list. For the current problem, there is no reproducible code, as it

Re: [R] R-help Digest, Vol 126, Issue 34

2013-08-31 Thread Sudheer Joseph
Hi, I was using R arima and the results are stored. If I need to print , is there a way to print the coeficient names spd.ar2ma1=arima(spd_a,order=c(2,0,1)) write.table(sprintf(%s,%6.3f,spd.ar2ma1$coef),file='arma_results.txt',eol

Re: [R] R help again..SORRY!

2013-08-31 Thread arun
HI, May be this helps: library(Ckmeans.1d.dp)  set.seed(24)  RanNum1-runif(20,9,12) Ck1-Ckmeans.1d.dp(RanNum1,4)  plot(RanNum1,col=Ck1$cluster)  abline(h=Ck1$centers,col=1:4,pch=8,cex=2)  Ck1$cluster # [1] 2 2 3 3 3 4 2 4 4 2 3 2 3 3 2 4 2 1 3 1 which(Ck1$cluster==2,arr.ind=T) #[1]  1  2  7

Re: [R] R help: My calculation is different than the one in R with ARIMA(2, 3, 0) model

2013-08-05 Thread Paul Bernal
Dear Salaam, In your ARIMA (2,3,0), you are telling R you are saying that the order of differencing is 3. Have you chequed that you actually differenced the series with d = 3? Regards, 2013/8/5 Salaam Batur swordligh...@gmail.com Dear R users, I picked up ARIMA(2,3,0) model for my time

Re: [R] R-help Digest, Vol 126, Issue 6

2013-08-04 Thread Aziz, Muhammad Fayez
Hi, My question is how to make panel sizes variable in box plots. I mean if a panel has 10 box plots and another has only two, I need to make the later panel thinner than the first. Regards, Fayez Grad Student UIUC, USA __ R-help@r-project.org

Re: [R] R Help.

2013-08-01 Thread Ista Zahn
Hi Darren, Take a look at the effects package. The documentation is good and these articles will help you get oriented: http://www.jstatsoft.org/v08/i15 http://www.jstatsoft.org/v32/i01 Best, Ista On Thu, Aug 1, 2013 at 1:56 AM, Darren Andrew Whitehead darrenwhitehe...@hotmail.com wrote: Hello

Re: [R] R help

2013-07-31 Thread Jim Lemon
On 07/31/2013 10:03 PM, Mª Teresa Martinez Soriano wrote: Hi First of all, thanks for this service, it is being very useful for me. I am new in R so I have a lot of doubts. I have to do imputation in a data set, this is a sample of my data set which looks like: NUMERO Data1

Re: [R] R Help

2013-07-19 Thread PIKAL Petr
Hi It would be better if you provided either str(yourdata) or dput(yourdata) (or a part illustrating those 2 kinds of missing values) Anyway I would use NA for missing and some other identifier for empty. temp a b c 1 1 empty 2 NA filled xx 3 2 filled xx is.na(temp) a

Re: [R] R-help Digest, Vol 124, Issue 22

2013-06-21 Thread David Duffy
Vallejo, Roger roger.vall...@ars.usda.gov asked: I would like to know if we can estimate Rg between two binary traits (disease status: alive vs. dead) with the R package. My data: we have 100 full-sib (FS) families, and two random samples (each with n= 200 FS fish) from each FS family were

Re: [R] R-help Digest, Vol 124, Issue 21

2013-06-20 Thread Prof J C Nash (U30A)
And it could be that you should try nlmrt or minpack.lm. I don't think you were at my talk in Jena May 23 -- might have been very helpful to you. JN On 13-06-20 06:00 AM, r-help-requ...@r-project.org wrote: Message: 47 Date: Wed, 19 Jun 2013 13:17:29 -0500 From: Adams, Jeanjvad...@usgs.gov

Re: [R] R-help Digest, Vol 124, Issue 12

2013-06-11 Thread Keith S Weintraub
Folks, Sorry for butting in here. I ran the code from John Kane below and it worked fine. I did however get a deprecation message suggesting the use of ggpairs from the GGally package to make this chart. Unfortunately I haven't found the correct incantation to get the diagonal to display

Re: [R] R-help Digest, Vol 124, Issue 12

2013-06-11 Thread Abdul Rahman bin Kassim (Dr.)
Dear R-User, Appreciate any helps. Given that I have a dataframe of tree population with three variable: sp=species , d0=initial_size grow=growth increment from initial size per year How can I calculate the future growth of each tree for the next 10 years. The following Rscript was written,

Re: [R] R help on loops

2013-06-07 Thread Laz
Dear R users, I am stuck here: My first function returns a vector of 5 values. In my second function, I want to repeat this, a number of times, say 10 so that I have 10 rows and five columns but I keep on getting errors. See the code and results below: optm -function(perm, verbose = FALSE) {

Re: [R] R help on loops

2013-06-07 Thread Berend Hasselman
On 07-06-2013, at 10:59, Laz lmra...@ufl.edu wrote: Dear R users, I am stuck here: My first function returns a vector of 5 values. In my second function, I want to repeat this, a number of times, say 10 so that I have 10 rows and five columns but I keep on getting errors. See the code

Re: [R] R help on loops

2013-06-07 Thread Laz
Dear Berend, For reproducibility, Rspatswap() is a function which originally returns a single value. For example Rspatswap(...) and you get 0.8 So, run Rspatswap() 20 times and store all the values. Then from these 20 values, calculate the calculate average, sd,se,min,max to get something

Re: [R] R help on loops

2013-06-07 Thread Laz
Hi, I am almost getting there, but still have errors. Thanks for your help. I have tried improving but I get the following errors below: itn-function(it){ +siml-matrix(NA,ncol=5,nrow=it) +for(g in 1:it){ +siml[g]-optm(perm=20)[g] +} +siml +} itn(3) [,1] [,2] [,3] [,4] [,5] [1,]

Re: [R] R help on loops

2013-06-07 Thread Berend Hasselman
On 07-06-2013, at 11:57, Laz lmra...@ufl.edu wrote: Dear Berend, I have made some changes but I still get errors: For reproducibility, Rspatswap() is a function which originally returns a single value. For example Rspatswap(...) and you get 0.8 So, run Rspatswap() 20 times and

Re: [R] R help on loops

2013-06-07 Thread Berend Hasselman
Please, please do not use html formatted mail. It is clearly requested by the mailing list The code of your last mail is a mess and when replying it becomes even more of a mess. I told you to do siml[g,] - optm(perm=20) See the comma after g. and not what you are now doing with

Re: [R] R help on loops

2013-05-31 Thread jim holtman
Is this what you want? I was not clear on your algorithm, but is looks like you wanted descending values: testx - + function(n, verbose = FALSE) + { + mat - cbind(optA = sample(n, n, TRUE), perm = seq(n)) + if (verbose){ + cat(***starting matrix\n) + print(mat) + } +

Re: [R] R-help Digest, Vol 123, Issue 30

2013-05-27 Thread Neotropical bat risk assessments
Hi all are there any R packages that include circular stats similar to Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)? I am interested in looking at annual patterns of bat activity where data will have date/times and relative abundance values for each Date. I would like to have a

Re: [R] R-help Digest, Vol 123, Issue 30

2013-05-27 Thread Jim Lemon
On 05/27/2013 10:28 AM, Neotropical bat risk assessments wrote: Hi all are there any R packages that include circular stats similar to Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)? I am interested in looking at annual patterns of bat activity where data will have date/times and

Re: [R] R-Help: nparLD Package Non-parametric Repeated Measures

2013-05-16 Thread Gerrit Eichner
Hello, James, see my comments inline. ... Main issue/question: In R the nparLD ANOVA-type Test showed a significant p-value for diel period, no effect of season, and no interaction between diel period and season. But a post-hoc Wilcoxon Signed-Rank Test did NOT find a significant difference

Re: [R] R help: Batch read files based on names in a list

2013-05-15 Thread arun
HI, You could use: (# with 3 files in my folder) lfiles-list.files(pattern=.txt)  lfiles #[1] file1.txt file2.txt file3.txt lst1-lapply(lfiles,function(x) read.table(x,header=TRUE,sep=,stringsAsFactors=FALSE)) lst1 #[[1]] #  col1 col2 #1    1  0.5 #2    2  0.2 #3    3  0.3 #4    4  0.3 #5    5 

Re: [R] R help: Batch read files based on names in a list

2013-05-15 Thread Enrico Schumann
On Wed, 15 May 2013, Jonathan Dry dry...@gmail.com writes: * I am currently reading in a series of files, applying the same functions to them one at a time, and then merging the resulting data frames e.g.: MyRows - c(RowA, RowB, RowC)File1_DF -

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-08 Thread Vivek Das
Hi Arun, I am still facing trouble as I can see the data output is identical for all rows when I am using this merge function. It seems that since in my data2 which I have provided I have not given you the exact genes I have. There are likely to be repeatations of ID in both the files but the

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-07 Thread arun
Hi Vivek, May be this helps: set.seed(35)  dat1- cbind(ID=1:8, as.data.frame(matrix(sample(1:50,8*7,replace=TRUE),ncol=7))) set.seed(38) dat2- cbind(ID= sample(1:20,8,replace=FALSE), as.data.frame(matrix(sample(1:50,8*33,replace=TRUE),ncol=33))) colnames(dat2)[-1]-gsub(V,X,colnames(dat2)[-1])  

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-07 Thread Vivek Das
HI Arun, My data sets are as in the provided files. I am providing the sample files. I guess this will give a better idea to the type of working I want to do with the two files and the kind or script am trying to write. Hope you can give me some suggestions regarding this. I am new to R so having

Re: [R] R help for creating expression data of Differentially expressed genes

2013-05-07 Thread arun
HI, Assuming that out_dat.txt is the output you expected.  dat1- read.table(data1.txt,header=TRUE,stringsAsFactors=FALSE) dat2- read.table(data2.txt,header=TRUE,stringsAsFactors=FALSE) out_dat- read.table(out_data.txt,header=TRUE,stringsAsFactors=FALSE)  out_dat2-merge(dat1[,1:4],dat2,by=ID)  

Re: [R] R help - bootstrap with survival analysis

2013-04-30 Thread Terry Therneau
This comes up regularly. Type ?print.survfit and look at the comments there under value. Terry T. - begin included message Hi, I'm not sure if this is the proper way to ask questions, sorry if not. But here's my problem: I'm trying to do a bootstrap estimate of the

Re: [R] R-help Digest, Vol 121, Issue 5

2013-03-26 Thread Kerry
Thank you Jason!  actually, there have been two solutions and one is yours setting row.names=F works great, additionally what Ive been having problems with is the European version of Word 2010.  Apparently it sets delimiters of ; instead of , as in the English/USA version.  This is something

Re: [R] R-help Digest, Vol 121, Issue 5

2013-03-26 Thread Robert Baer
On 3/26/2013 7:21 AM, Kerry wrote: Thank you Jason! actually, there have been two solutions and one is yours setting row.names=F works great, additionally what Ive been having problems with is the European version of Word 2010. Apparently it sets delimiters of ; instead of , as in the

Re: [R] R-help Digest, Vol 121, Issue 5

2013-03-05 Thread Law, Jason
On R 2.15.2 and ArcGIS 9.3.1, it works for me in ArcCatalog but you have to follow the particulars here: http://webhelp.esri.com/arcgisdesktop/9.3/index.cfm?TopicName=Accessing_delimited_text_file_data For example: write.table(test, '***.tab', sep = '\t', row.names = F) The extension .tab and

Re: [R] R -HELP REQUEST

2013-02-05 Thread Rolf Turner
If you just want point forecasts, it's simple: Let your original series be X_t, t=1, ..., N. Let Y_t = log(X_t). Let Z_t = Y_t - Y_{t-1}, t = 2, ..., N. Fit your model and forecast, obtaining Z-hat__1, ..., Z-hat_10. Then Y-hat_{N+1} = Y_N + Z-hat_1, Y-hat_{N+2} = Y-hat_{N+1} + Z-hat_2, .,

Re: [R] R-help archives --- are they up-to-date?

2013-01-29 Thread Sarah Goslee
The searchable archives may lag, and apparently do. The main list archive is here: https://stat.ethz.ch/pipermail/r-help/ and is complete. That's the one to check if you wish to know whether something made it to the list. If you go to the r-help listinfo link in the mailing list footer, you are

Re: [R] R-help archives --- are they up-to-date?

2013-01-29 Thread Rolf Turner
On 01/30/2013 10:28 AM, Sarah Goslee wrote: The searchable archives may lag, and apparently do. The main list archive is here: https://stat.ethz.ch/pipermail/r-help/ and is complete. That's the one to check if you wish to know whether something made it to the list. If you go to the r-help

Re: [R] R-help Digest, Vol 118, Issue 20

2012-12-20 Thread Terry Therneau
I don't know of one. If building your own you could use rpart with the maxdepth=1 as the tool to find the best split at each node. Terry Therneau On 12/20/2012 05:00 AM, r-help-requ...@r-project.org wrote: Hi, I've searched R-help and haven't found an answer. I have a set of data from

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread David Winsemius
On Nov 23, 2012, at 1:14 PM, prasmas wrote: Hi, I am new to R. I am trying to regroup data frame using multiple constrains. for example data frame: data value class percent 15526 36 4.6875 15527 62 85.9375 15527 82 32.4564 15528 36 70.3125 15528 62

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread Rui Barradas
Hello, Like the following? dat - read.table(text= value class percent 15526 36 4.6875 15527 62 85.9375 15527 82 32.4564 15528 36 70.3125 15528 62 9.375 15528 82 74.6875 , header = TRUE) per70 - dat$percent 70 split(dat, list(dat$class, per70)) Hope this helps, Rui Barradas Em 23-11-2012

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread David Winsemius
, 2012 7:40 PM Subject: Re: [R] R help..subsetting data frame that meeting multiple criteria On Nov 23, 2012, at 1:14 PM, prasmas wrote: Hi, I am new to R. I am trying to regroup data frame using multiple constrains. for example data frame: data valueclasspercent 1552636

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread arun
HI, You could also try this: dat - read.table(text= value class percent 15526 36 4.6875 15527 62 85.9375 15527 82 32.4564 15528 36 70.3125 15528 62 9.375 15528 82 74.6875 15529 72 50. 15530 72 50. , header = TRUE) mat1-as.matrix(dat)

Re: [R] R help..subsetting data frame that meeting multiple criteria

2012-11-23 Thread arun
74.6875 A.K. - Original Message - From: David Winsemius dwinsem...@comcast.net To: prasmas prasad...@gmail.com Cc: r-help@r-project.org Sent: Friday, November 23, 2012 7:40 PM Subject: Re: [R] R help..subsetting data frame that meeting multiple criteria On Nov 23, 2012, at 1:14 PM

Re: [R] r-help or r-devel ?

2012-11-05 Thread Marc Schwartz
On Nov 5, 2012, at 11:24 AM, Christophe Genolini cgeno...@u-paris10.fr wrote: Hi the list, I have some basic questions about writing a package. On which list shall I post them? Theoretically, I am supposed to post them on r-devel, but all the questions on this list are very advance

Re: [R] R help - Adding a column in a data frame with multiple conditions

2012-10-04 Thread Sarah Goslee
Hi Libby, You had an accumulation of small errors, from an extra ) to an unclear understanding of how indexing works in R. Also, you shouldn't call your dataframe df, or use square brackets in column names. That said, what about: sampledata - structure(list(A = c(1L, 1L, 1L, 2L, 2L, 2L, 3L,

Re: [R] R help - Adding a column in a data frame with multiple conditions

2012-10-04 Thread arun
Gertken libb...@utexas.edu Cc: r-help@r-project.org Sent: Thursday, October 4, 2012 4:03 PM Subject: Re: [R] R help - Adding a column in a data frame with multiple conditions Hi Libby, You had an accumulation of small errors, from an extra ) to an unclear understanding of how indexing works in R

Re: [R] R-help Digest, Vol 115, Issue 12

2012-09-12 Thread Stephen Politzer-Ahles
Hello Amelie, I don't have an answer to your question, but I just wanted to point out this page I noticed recently ( http://hlplab.wordpress.com/2009/05/07/multinomial-random-effects-models-in-r/), which might be helpful. I'm also interested in figuring out how to do a multinomial glmm, so if

Re: [R] R-help question

2012-08-13 Thread R. Michael Weylandt
On Sun, Aug 12, 2012 at 10:58 PM, Louise Cowpertwait louisecowpertw...@gmail.com wrote: Hi there, I have subscribed to R-help but am not sure how to view or post questions? I think this is the right way. Indeed! I am planning on doing a multivariate regression investigating the

Re: [R] R help

2012-08-08 Thread Jeff Newmiller
There seem to be too many quotes in your error message... the path and name of the program should be quoted, the argument should not (or should be separately quoted). 500M isn't especially large these days... be sure to check your existing (default) value using the memory.limit() function

Re: [R] R help

2012-08-08 Thread Jeff Newmiller
Please continue to include the r-help list in the conversation... you will most likely get your solution quicker. Why do you have double backslashes? That is needed within R, but not at the command line or in a shortcut.

Re: [R] R: Help xts object Subset Date by Day of the Week

2012-08-06 Thread R. Michael Weylandt
On Sun, Aug 5, 2012 at 4:49 PM, Douglas Karabasz doug...@sigmamonster.com wrote: I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts) library(quantmod) library(lubridate) # Gets SPY data getSymbols(SPY) # Subset Prices

Re: [R] R: Help xts object Subset Date by Day of the Week

2012-08-06 Thread R. Michael Weylandt
On Mon, Aug 6, 2012 at 4:30 PM, R. Michael Weylandt michael.weyla...@gmail.com wrote: On Sun, Aug 5, 2012 at 4:49 PM, Douglas Karabasz doug...@sigmamonster.com wrote: I have a xts object made of daily closing prices I have acquired using quantmod. Here is my code: library(xts)

Re: [R] R- Help (looping)

2012-07-31 Thread Rui Barradas
Hello, Inline Em 31-07-2012 02:59, Wellington Silva escreveu: Ok, This really helped. You've probably noticed, I'm a begginer using R. And when you said that you tried with rnorm and the counts were not zero, where did you use the rnorm? Where the runif is, in its stead use matrix(

Re: [R] R- Help (looping)

2012-07-31 Thread Rui Barradas
Hello, Glad it helped. E fico à espera do relatório. Rui Barradas Em 31-07-2012 14:40, Wellington Silva escreveu: Rui, This is a cientific initiation program. The idea is to develop a code which can simulate data and calculate the ARL later. *So, a little bit later yesterday night, after

Re: [R] R- Help (looping)

2012-07-30 Thread Rui Barradas
Hello, Your code example doesn't make much sense, it needs decrypting. Let's see, for(k in 1:length(c1)){ if(c1[k] lcl | c1[k] ucl) {do something} } If this is it, then you can completely avoid the loop: i1 - c1 lcl | c1 ucl # create an index vector out.of.control - c1[ i1 ]

Re: [R] R- Help (looping)

2012-07-30 Thread Rui Barradas
Hello, Try the following. # make up some data dds - 1e3 nc - 10 xss - data.frame(matrix(runif(nc*dds, min=-1, max=1), ncol=nc)) names(xss) - paste0(xs, 1:10) # two functions with descriptive names getControlLimits - function(x, L = 3){ mu - mean(x) sigma - sd(x) c(lcl = mu -

Re: [R] R-help Digest, Vol 113, Issue 20

2012-07-17 Thread Francois Maurice
Hi,   I'm using write.table() to export dataframe to Excel. All works fine except that I want to export the variable labels instead of variable names.    I can see the labels in the R consol using attr(), but I just don't know how to use the labels instead of the names.   Thanks,   François

Re: [R] R help

2012-07-16 Thread Jessica Streicher
https://stat.ethz.ch/mailman/listinfo/r-help at the bottom… On 16.07.2012, at 10:52, Sébastien Morant wrote: hi would you please remove my email from the mailing list. thanks in advance Sebastien [[alternative HTML version deleted]] __

Re: [R] R-help Digest, Vol 113, Issue 19

2012-07-16 Thread e-letter
On 16/07/2012, r-help-requ...@r-project.org r-help-requ...@r-project.org wrote: -- Message: 77 Date: Mon, 16 Jul 2012 10:48:39 +0100 From: Rui Barradas ruipbarra...@sapo.pt To: e-letter inp...@gmail.com Cc: r-help@r-project.org Subject: Re: [R] histogram of

Re: [R] R-help Digest, Vol 113, Issue 13

2012-07-10 Thread Terry Therneau
http://www.ncbi.nlm.nih.gov/pubmed/21418051 for the full reference. I don't have an electronic copy, but I do have that issue of Biometrics in my office. I'll have a copy sent over. Terry On 07/10/2012 04:08 PM, r-help-requ...@r-project.org wrote: Send R-help mailing list submissions to

Re: [R] R help, using R to build choropleth

2012-06-28 Thread Pascal Oettli
Hello, You can find some hints there: http://geography.uoregon.edu/geogr/topics/index.html Regards Le 12/06/28 14:26, iverson a écrit : Hi guys i need some help to build choropleth. Basically i am trying to colour regions on the map by population. I possess the shape file of the country,

Re: [R] R help, using R to build choropleth

2012-06-28 Thread Jim Lemon
On 06/28/2012 03:26 PM, iverson wrote: Hi guys i need some help to build choropleth. Basically i am trying to colour regions on the map by population. I possess the shape file of the country, and also the population data, however, i am having trouble to create the plot, below is my code:

Re: [R] R-help Digest, Vol 112, Issue 25

2012-06-25 Thread John C Nash
While lm() is a linear modeling, the constraints make it easier to solve with a nonlinear tool. Both my packages Rvmmin and Rcgmin (I recommend the R-forge versions as more up-to-date) have bounds constraints and masks i.e., fixed parameters. I am actually looking for example problems of this

Re: [R] R-help Digest, Vol 112, Issue 6

2012-06-06 Thread David L Lorenz
Rich, The documentation for cenboxplot states that the second argument must be logical and not integer. the function cenboxplot substitutes synthetic values for censored values using ros, hence the error message from the ros method. I also do not understand how you expect group = 'SO4' to

Re: [R] R help!

2012-05-03 Thread Nutter, Benjamin
So long as x is a character vector, I tend to use the following for this problem. x - c(12/31/11 23:45, 1/1/12 2:15) x.split - strsplit(x, ) x.date - sapply(x.split, function(y) return(y[1])) x.time - sapply(x.split, function(y) if (length(y) 1) return(y[2]) else NA) x.date [1]

Re: [R] R help!

2012-05-03 Thread peter dalgaard
On May 3, 2012, at 14:05 , Nutter, Benjamin wrote: So long as x is a character vector, I tend to use the following for this problem. x - c(12/31/11 23:45, 1/1/12 2:15) x.split - strsplit(x, ) x.date - sapply(x.split, function(y) return(y[1])) x.time - sapply(x.split, function(y) if

Re: [R] R help!

2012-05-03 Thread Petr PIKAL
Hi I would convert it to propper date format and then you can extract anything. dat-strptime(12/31/11 23:45, format=%m/%d/%y %H:%M) as.Date(dat) [1] 2011-12-31 format(dat, %H:%M) [1] 23:45 Regards Petr Hello there, I was wondering if you could help me with a quick R issue. I have a

Re: [R] R help!

2012-05-02 Thread Jorge I Velez
Hi Alex, Here is one way: s - 12/31/11 23:45 strsplit(s, )[[1]] # [1] 12/31/11 23:45 * HTH, Jorge.- * On Wed, May 2, 2012 at 4:00 PM, Alex Roth wrote: Hello there, I was wondering if you could help me with a quick R issue. I have a data set where one of the columns has both date and

<    1   2   3   4   5   >