Re: [R] matrix of size 30^5

2013-04-23 Thread Benjamin Caldwell
Thanks all for your helpful suggestions. I replaced the hard drive of this computer and augmented the RAM to 8 GB over the weekend, and things seen to be running very smoothly now. I'll certainly use the methods provided here as I push the limits on these types of matrices and objects. Best *Ben C

Re: [R] Questions on function "readNamedRegionFromFile" in XLConnect pacakge

2013-04-23 Thread andrija djurovic
Hi Miao. 1. "Calendar", "Iris", "IQ" are the named region in excel file multiregion.xlsx (demoFiles/multiregion.xlsx). Open this file (demoFiles/multiregion.xlsx), go to Formulas tab and click Name manager to see reference regions. 2. Check following functions: ?readWorksheet #arguments startC

Re: [R] Questions on function "readNamedRegionFromFile" in XLConnect pacakge

2013-04-23 Thread andrija djurovic
Here is the concrete example: > # multiregion xlsx file from demoFiles subfolder of package XLConnect > demoExcelFile <- system.file("demoFiles/multiregion.xlsx", + package = "XLConnect") > > # Load a single named region into a single data.frame. > DF1 <- readNamedRegi

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Liviu Andronic
Dear David, I'm having the exact same issue as Santosh, and looking at the fix that you've provided it seems to me that results are slightly different. On Tue, Apr 23, 2013 at 4:40 AM, David Winsemius wrote: >> b c >> p a N mean sdmean sd >> A 1 10 16.30 2.49

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread David Winsemius
On Apr 23, 2013, at 12:53 AM, Liviu Andronic wrote: > Dear David, > I'm having the exact same issue as Santosh, and looking at the fix > that you've provided it seems to me that results are slightly > different. > Reverse the order of arguemtns to `interaction`: tabular( (`p a`=interaction(a,p

Re: [R] tables package - error message of "duplicate values"

2013-04-23 Thread Liviu Andronic
Dear David, I'm once again facing the same issue as Santosh. On Sat, Apr 20, 2013 at 12:15 AM, David Winsemius wrote: > > On Apr 19, 2013, at 2:03 PM, Santosh wrote: > >> Rounding was done to replicate the problem I faced in the original data >> set... > > I got an error every time I tried to u

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread David Winsemius
On Apr 23, 2013, at 1:00 AM, David Winsemius wrote: > > On Apr 23, 2013, at 12:53 AM, Liviu Andronic wrote: > >> Dear David, >> I'm having the exact same issue as Santosh, and looking at the fix >> that you've provided it seems to me that results are slightly >> different. >> > Reverse the ord

[R] Automation of R input

2013-04-23 Thread Vahe nr
Hi all, I have R script which during its run require an input like this: choose between one of the grouping factor available : c("Village", "Country") can I automate this part, in other word to pass for example Village when I am running the script. One more thing the script is the TimeSeriesAnal

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Liviu Andronic
On Tue, Apr 23, 2013 at 10:06 AM, David Winsemius wrote: > > On Apr 23, 2013, at 1:00 AM, David Winsemius wrote: > >> >> On Apr 23, 2013, at 12:53 AM, Liviu Andronic wrote: >> >>> Dear David, >>> I'm having the exact same issue as Santosh, and looking at the fix >>> that you've provided it seems t

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Liviu Andronic
Dear David, On Tue, Apr 23, 2013 at 10:00 AM, David Winsemius wrote: > tabular( (`p a`=interaction(a,p, drop=TRUE, sep=" ")) ~ (N = 1) + (b + c)* > (mean+sd),data=q) > > b c > p a N mean sd mean sd > 1 A 10 12.8 0.7888 52.1 8.020 > 3 A 10 14.6 3.7771 56.5

Re: [R] tables package - error message of "duplicate values"

2013-04-23 Thread Duncan Murdoch
On 13-04-23 4:05 AM, Liviu Andronic wrote: Dear David, I'm once again facing the same issue as Santosh. On Sat, Apr 20, 2013 at 12:15 AM, David Winsemius wrote: On Apr 19, 2013, at 2:03 PM, Santosh wrote: Rounding was done to replicate the problem I faced in the original data set... I go

Re: [R] Automation of R input

2013-04-23 Thread andrija djurovic
Hi. If you want to do it completely in R you can create R gui using gWidgets package. Here is an example of creating gui for function arguments (thanks to John Verzani): library(gWidgets) options(guiToolkit="tcltk") ##' An editor for an argument ##' depends on calss of object arg_editor <- funct

[R] lp.transport in package lpSolve

2013-04-23 Thread Michael Haenlein
Dear all, I'm working on a very complex linear optimization problem using the lp.transport function in lpSolve. My PC has 10 cores, but by default R uses only one of them. Is there a straightforward way to make lp.transport use all cores available? I had a look at "High-performance and parallel c

Re: [R] extracting the diagonal of an inverse matrix

2013-04-23 Thread Camarda, Carlo Giovanni
Thanks: really nice idea. Unfortunately the solution you suggest can not be adopted with sparse matrices: solve command with logical is not yet implemented. (Or do I have a too-old R-version?) ## loading package library(Matrix) ## transform A in sparse matrix Asp <- Diagonal(9) pos <- which(A!=

[R] Re

2013-04-23 Thread Vahe nr
Hi andrija djurovic, Thanks a lot for your replyand for your useful suggestions. Actually I need to run this script without user interaction, so when it is required to input Village I need to pass it automatically not by the user. Regards, Vahe [[alternative HTML version deleted]]

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Duncan Murdoch
On 13-04-22 10:40 PM, David Winsemius wrote: On Apr 22, 2013, at 5:49 PM, Santosh wrote: Dear Rxperts, q <- data.frame(p=rep(c("A","B"),each=10,len=30), a=rep(c(1,2,3),each=10),id=seq(30), b=round(runif(30,10,20)), c=round(runif(30,40,70))) The operation below... tabular(((p=factor(p))*(a=fact

[R] Frequency Block Chart

2013-04-23 Thread Angelo Scozzarella Tiscali
Hi, friends. I'd like to illustrate the relationship between two categorical variables with a block chart (a three-dimensional bar chart) with the height of the blocks being proportional to the frequencies. Is there a way to do it with R? Thanks in advance Angelo [[alternative HTML ver

[R] One more question...

2013-04-23 Thread Vahe nr
Thanks a lot Andrija... I run the following in Rsutdio: library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15") ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="") region="Mzimba" Ystart=2004 Yend=2006 shape="SLP_M

[R] One more question please...

2013-04-23 Thread Vahe nr
I executed the code in rstudio successfully: library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15") ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="") region="Mzimba" Ystart=2004 Yend=2006 shape="SLP_Mzimba" shape

[R] Need a little help about this script...

2013-04-23 Thread Vahe nr
library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15") ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="") region="Mzimba" Ystart=2004 Yend=2006 shape="SLP_Mzimba" shapedir=paste(system.file("extdata/shape", packag

[R] Fwd: One more question please...

2013-04-23 Thread Vahe nr
I executed the code in rstudio successfully: library("ndvits", lib.loc="/home/vahe/R/i686-pc-linux-gnu-library/2.15") ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="") region="Mzimba" Ystart=2004 Yend=2006 shape="SLP_Mzimba" shape

[R] Excluding questions in interviews with library tm

2013-04-23 Thread Pedro Manuel Martínez Monje
Hi, I have started working with the library tm on 17 interviews. I need in my analysis exclude the paragraphs containing the questions. Is there a procedure with library tm that allows me to do this automatically? My searches about that have produced no results. Thanks P. Manuel Martínez

[R] call a variable from outside of for loop

2013-04-23 Thread eliza botto
Dear useRs, While using print command in "for" loop, i designated a variable being printed by "e". Although the output was shown inside the loop but when i tried to call the variable outside the loop it only gave the first row, where as it should have 35 rows as it showed inside loop.The command

Re: [R] Frequency Block Chart

2013-04-23 Thread Eik Vettorazzi
Hi Angelo, you might have a look at this http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=06;figure=06_15;theme=stdBW;code=right Cheers Am 23.04.2013 12:42, schrieb Angelo Scozzarella Tiscali: > Hi, friends. > I'd like to illustrate the relationship between two categorical variable

[R] SSbiexp

2013-04-23 Thread catalin roibu
Hello all! I have a problem to use a biexponential regression model: I use this code: n3<-nls(proc~SSbiexp(cls,a,b,c,d),data=bline) and this is the error message: Error in nls(y ~ cbind(exp(-exp(lrc1) * x), exp(-exp(lrc2) * x)), data = xy, : singular gradient My data is like this: structure(l

Re: [R] call a variable from outside of for loop

2013-04-23 Thread Berend Hasselman
On 23-04-2013, at 13:21, eliza botto wrote: > Dear useRs, > While using print command in "for" loop, i designated a variable being > printed by "e". Although the output was shown inside the loop but when i > tried to call the variable outside the loop it only gave the first row, where > as it

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Liviu Andronic
Dear Duncan, Thank you for your explanations. On Tue, Apr 23, 2013 at 12:31 PM, Duncan Murdoch wrote: > This isn't something that the package is designed to handle: if you say > p*a, it wants all combinations of p and a. > To your knowledge is there another 'complex tables' package that could ac

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Duncan Murdoch
On 13-04-23 6:31 AM, Duncan Murdoch wrote: On 13-04-22 10:40 PM, David Winsemius wrote: On Apr 22, 2013, at 5:49 PM, Santosh wrote: Dear Rxperts, q <- data.frame(p=rep(c("A","B"),each=10,len=30), a=rep(c(1,2,3),each=10),id=seq(30), b=round(runif(30,10,20)), c=round(runif(30,40,70))) The opera

Re: [R] call a variable from outside of for loop

2013-04-23 Thread Rui Barradas
Hello, It seems that you're recreating the variable 'e' every time through the loop. In the end you only have 1 row. Try to create it outside the loop, like e <- vector("list", 35) Then inside the loop e[[i]] <- print(...) Hope this helps, Rui Barradas Em 23-04-2013 12:21, eliza botto es

Re: [R] call a variable from outside of for loop

2013-04-23 Thread eliza botto
Dear Rui,it worked...thanks indeed for you timely responce elisa > Date: Tue, 23 Apr 2013 13:09:58 +0100 > From: ruipbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] call a variable from outside of for loop > > Hello, > > It seems that you're recre

[R] document methods in Reference Classes

2013-04-23 Thread Andrea Franceschini
Dear all, I would like to get informations on how to document Reference Classes. I noticed that for every normal S4 method there is normally a corresponding .Rd file in the "man" directory of the package. Is this valid also for methods of the reference classes ? Apparently the "package.skeleton"

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Duncan Murdoch
On 13-04-23 8:07 AM, Liviu Andronic wrote: Dear Duncan, Thank you for your explanations. On Tue, Apr 23, 2013 at 12:31 PM, Duncan Murdoch wrote: This isn't something that the package is designed to handle: if you say p*a, it wants all combinations of p and a. To your knowledge is there anot

Re: [R] Frustration to get help R users group

2013-04-23 Thread John Fox
Dear Champak Ishram, It's not surprising that what you did doesn't work because the model specification and the arguments that you employed bear no relationship that I can discern to the sem() function in the sem() package. I think that you're probably confusing the sem package with something e

Re: [R] call a variable from outside of for loop

2013-04-23 Thread Jeff Newmiller
To be clear, the reproducible example should show us what the problem behavior is, and should be supplemented with some artificially-generated data that shows what you want to get. (We don't expect you to know the answer already.) http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-

Re: [R] parSapply can't find function

2013-04-23 Thread Uwe Ligges
On 18.04.2013 11:11, Kaiyin Zhong (Victor Chung) wrote: Here is the code, assuming 8 cores in the cpu. library('modeest') library('snow') cl = makeCluster(rep('localhost', 8), 'SOCK') x = vector(length=50) x = sapply(x, function(i) i=sample(c(1,0), 1)) pastK = function(n, x, k) { if (n>

Re: [R] call a variable from outside of for loop

2013-04-23 Thread Berend Hasselman
On 23-04-2013, at 14:19, eliza botto wrote: > Dear Rui,it worked...thanks indeed for you timely responce > elisa > In the original post you mentioned that e only held the first row. But with what you showed I would have expected e to hold the last number printed. So it's still unclear wha

Re: [R] parSapply can't find function

2013-04-23 Thread Kaiyin Zhong (Victor Chung)
Thanks for the reply. How can i make the functions known to all nodes? Best regards, Kaiyin ZHONG -- FMB, Erasmus MC k.zh...@erasmusmc.nl kindlych...@gmail.com On Tue, Apr 23, 2013 at 2:43 PM, Uwe Ligges wrote: > > > On 18.04.2013 11:11, Kaiyin Zhong (Victor Chun

Re: [R] Tables package - remove NAs and NaN

2013-04-23 Thread Liviu Andronic
Dear Duncan, On Tue, Apr 23, 2013 at 2:13 PM, Duncan Murdoch wrote: > I've done this now, in version 0.7.54 on R-forge. To leave out the rows > with N=0, you can select a subset of the table where N (the first column) is > non-zero: > > tab <- tabular(((p=factor(p))*(a=factor(a))+1) ~ (N = 1) +

Re: [R] parSapply can't find function

2013-04-23 Thread Uwe Ligges
On 23.04.2013 15:00, Kaiyin Zhong (Victor Chung) wrote: Thanks for the reply. How can i make the functions known to all nodes? See ?clusterEvalQ you may also want to try the parallel packages. Best, Uwe Ligges Best regards, Kaiyin ZHONG ---

Re: [R] SSbiexp

2013-04-23 Thread Rui Barradas
Hello, Try the following. fit <- nls(log(proc) ~ k + a*exp(b*cls), data = bline, start = c(k = 1, a = 1, b = 1)) summary(fit) plot(fitted(fit), log(bline$proc)) # Seems nice Hope this helps, Rui Barradas Em 23-04-2013 13:05, catalin roibu escreveu: Hello all! I have a problem to use a b

Re: [R] Multiple lon lat points in the map with ggplot2

2013-04-23 Thread John Kane
Your data frame does not make any sense. Please supply some sample data In a better form.. The easiest way to supply data is to use the dput() function. Example with your file named "testfile": dput(testfile) Then copy the output and paste into your email. For large data sets, you can j

[R] question

2013-04-23 Thread nafiseh hagiaghamohammadi
Hi I fit one  linear quantile regression with package quantreg and I want to khow this model is good or not.Is there method for checking it? Thanks your advice [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://s

[R] Need to replicate Boltzman Signmodial Curve fit from Graph Pad

2013-04-23 Thread J J
Hello useRs (please don't kill me), I've fairly new to R having only a few months of playing around with R. What little I've learned has been extremely useful. If someone could point me as to how to replicate the Boltzman Sigmodial curve fit as provided by Graphpad software I'd be eternally grate

Re: [R] SSbiexp

2013-04-23 Thread peter dalgaard
On Apr 23, 2013, at 14:05 , catalin roibu wrote: > Hello all! > I have a problem to use a biexponential regression model: > I use this code: > n3<-nls(proc~SSbiexp(cls,a,b,c,d),data=bline) and this is the error message: > > Error in nls(y ~ cbind(exp(-exp(lrc1) * x), exp(-exp(lrc2) * x)), data =

[R] Hosmer Lemeshow test

2013-04-23 Thread Endy BlackEndy
Hi to everybody. I use the following routine (i found it in the internet) to compute the Hosmer-Lemeshow test in the framework of logistic regression. hosmerlemeshow = function(obj, g=10) { # first, check to see if we fed in the right kind of object stopifnot(family(obj)$family=="binomial" && f

Re: [R] extracting the diagonal of an inverse matrix

2013-04-23 Thread William Dunlap
Wrap the logical seq_len(nrow(Asp)) == i with as.numeric() as.numeric(seq_len(nrow(Asp)) == i) and it will work (slowly). Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: Camarda, Carlo Giovanni [mailto:cama...@demogr.mpg.de] > Sent: Tuesday, Apri

[R] GAM Penalised Splines - Intercept

2013-04-23 Thread Lucas Holland
Hey all, I'm using the gam() function inside the mgcv package to fit a penalised spline to some data. However, I don't quite understand what exactly the intercept it includes by default is / how to interpret it. Ideally I'd like to understand what the intercept is in terms of the B-Spline and

Re: [R] Extract part of a numer

2013-04-23 Thread arun
Hi, May be this helps: set.seed(25) dat1<- data.frame(ID=c("1001#01","1001#02","1001#03","1002#01","1002#02"),val=rnorm(5),stringsAsFactors=FALSE)  dat1$ID<-as.numeric(gsub("#.*","",dat1$ID))  dat1 #    ID    val #1 1001 -0.2118336 #2 1001 -1.0415911 #3 1001 -1.1533076 #4 1002  0.3215315 #5 10

Re: [R] question

2013-04-23 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi wrote: > Hi > > I fit one linear quantile regression with package quantreg and I want to > khow this model is good or not.Is there method for checking it? > Thanks your advice > How is this different than the question you asked and were

Re: [R] Need to replicate Boltzman Signmodial Curve fit from Graph Pad

2013-04-23 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 3:55 PM, J J wrote: > Hello useRs (please don't kill me), > > I've fairly new to R having only a few months of playing around with R. > What little I've learned has been extremely useful. > > If someone could point me as to how to replicate the Boltzman Sigmodial > curve fi

Re: [R] Need to replicate Boltzman Signmodial Curve fit from Graph Pad

2013-04-23 Thread John Kane
No idea of the area but does this link help? http://bioinformatics.oxfordjournals.org/content/24/13/1549.full John Kane Kingston ON Canada > -Original Message- > From: rnoob...@gmail.com > Sent: Tue, 23 Apr 2013 10:55:59 -0400 > To: r-help@r-project.org > Subject: [R] Need to replicate

Re: [R] Need to replicate Boltzman Signmodial Curve fit from Graph Pad

2013-04-23 Thread peter dalgaard
On Apr 23, 2013, at 18:45 , R. Michael Weylandt wrote: > On Tue, Apr 23, 2013 at 3:55 PM, J J wrote: >> Hello useRs (please don't kill me), >> >> I've fairly new to R having only a few months of playing around with R. >> What little I've learned has been extremely useful. >> >> If someone coul

Re: [R] Hosmer Lemeshow test

2013-04-23 Thread David Carlson
The warning is commented out or it would have been printed: # warning("Some expected counts are less than 5. Use smaller number of groups") For 23 data points, the default of 10 bins is too many since one of the bins is 0. Eight bins gives the warning, but prints results. You didn't indicate

Re: [R] Need to replicate Boltzman Signmodial Curve fit from Graph Pad

2013-04-23 Thread Bert Gunter
I think you'll find that this is just an alternate parameterization of a 4 P logistic. ... and in any case there is no statistically detectable difference between the two. That is, this is just basically a Graphpad marketing ploy. Fit such data with anyone's logistic function ... and that is proba

[R] Needed: Beta Testers and Summer Camp Students

2013-04-23 Thread Paul Johnson
Greetings. I'm teaching linear regression this semester and that means I write more functions for my regression support package "rockchalk". I'm at a point now were some fresh eyes would help, so if you are a student in a course on regression, please consider looking over my package overview docu

Re: [R] R not loading

2013-04-23 Thread Barbour, Russell
Dear Dr. Langfelder, Thank you for your suggestion. Indeed there were two massive files in the ".RData file" which once I removed them , the program loads effortlessly. Thanks again for the suggest. Skip Russell " Skip" Barbour Ph.D. Associate Director for Statistics Center for Interdis

[R] Bootstrapping a 11x10 matrix

2013-04-23 Thread Herbejie Rose Cuizon
Good evening! This is Herbejie Rose I need your help for me to compute the following: I just want to ask on how to bootstrap a 11x10 matrix to obtain 1000 bootstrap samples and compute the 10 dimensional mean per bootstrap sample. the 11x10 dimension of the matrix has 11 subjects and 10 variable

[R] Strange graphical pattern when using hist() function

2013-04-23 Thread Humberto Mohr
Running the following lines I got a strange plot from hist function: x<-0:30 hist(x,breaks=31) As you can see, the 0 value appears two times in the plot. The Y axis only presents 1 as the highest value when: hist(x,breaks=62) Nevertheless, it seems to have two bars between 0 and 1. Could some

[R] Writing contrast statements to test difference of slope in linear regressions

2013-04-23 Thread Hallman, Tyler
Hi Everyone, I am uncertain that I am writing the contrast statements correctly. Basically, I'm unsure when to use a -1 and a 1 when writing the contrasts. Specifically I am interested in comparing the slopes between different temperature regimes. Temperature is therefore a factor. Time and per

Re: [R] Strange graphical pattern when using hist() function

2013-04-23 Thread Kevin E. Thorpe
On 04/23/2013 01:40 PM, Humberto Mohr wrote: Running the following lines I got a strange plot from hist function: x<-0:30 hist(x,breaks=31) As you can see, the 0 value appears two times in the plot. The Y axis only presents 1 as the highest value when: hist(x,breaks=62) Nevertheless, it seems

Re: [R] Strange graphical pattern when using hist() function

2013-04-23 Thread David Winsemius
On Apr 23, 2013, at 10:40 AM, Humberto Mohr wrote: > Running the following lines I got a strange plot from hist function: > > x<-0:30 > hist(x,breaks=31) > > As you can see, the 0 value appears two times in the plot. > The Y axis only presents 1 as the highest value when: > > hist(x,breaks=62

[R] Time and Date formatting

2013-04-23 Thread Ayyappa Chaturvedula
Dear Group, I have a problem with time date formatting. I have Date and Time in different columns in a .csv file and want to have a column with Date and Time together. I could format the date into the right mode using strptime and as.Date functions. I am not able to do that with TIME column. I

Re: [R] Needed: Beta Testers and Summer Camp Students

2013-04-23 Thread Claudia Beleites
Hi Paul, I skimmed over the pdf. I have comments on the discusssion about centering. I'm from a completely different field (chemometrics). Of course, I also have to explain centering. However, the argumentation I use is somewhat different from the one you give in your pdf. One argument I have i

Re: [R] Needed: Beta Testers and Summer Camp Students

2013-04-23 Thread Claudia Beleites
Hi Paul, I skimmed over the pdf. I have comments on the discusssion about centering. I'm from a completely different field (chemometrics). Of course, I also have to explain centering. However, the argumentation I use is somewhat different from the one you give in your pdf. One argument I have i

Re: [R] Writing contrast statements to test difference of slope in linear regressions

2013-04-23 Thread Cade, Brian
Tyler: To compare estimates of different slopes for Time by different factor levels of Temperature you need to estimate a model that allows for separate slopes. What you've estimated is a model for just different intercepts associated with Temperature factor but a common slope for Time. You proba

Re: [R] Time and Date formatting

2013-04-23 Thread Rui Barradas
Hello, See if any of the following will do. DATE <- "14/07/2010" TIME <- "20:21" paste(DATE, TIME) as.POSIXct(paste(DATE, TIME), format = "%d/%m/%Y %H:%M") Hope this helps, Rui Barradas Em 23-04-2013 19:46, Ayyappa Chaturvedula escreveu: Dear Group, I have a problem with time date forma

Re: [R] Time and Date formatting

2013-04-23 Thread Rui Barradas
Hello, Forgot to add strptime, like you had noted. strptime(paste(DATE, TIME), format = "%d/%m/%Y %H:%M") Rui Barradas Em 23-04-2013 19:54, Rui Barradas escreveu: Hello, See if any of the following will do. DATE <- "14/07/2010" TIME <- "20:21" paste(DATE, TIME) as.POSIXct(paste(DATE, TIM

Re: [R] Extract part of a numer

2013-04-23 Thread arun
Hi, Try this: set.seed(25) dat1<- data.frame(ID=c(10011001,10011004,20012001,2022001,12002),val=rnorm(5),stringsAsFactors=FALSE) dat2<- dat1 library(stringr) dat1$ID<-as.numeric(str_sub(dat1$ID,-4,-1))  dat1 #    ID    val #1 1001 -0.2118336 #2 1004 -1.0415911 #3 2001 -1.1533076 #4 2001  0.3

[R] adding the second regressor

2013-04-23 Thread Tarkan Cavusoglu
Hi...Can anyone help me for adding the second regressor to the FMOLS regresion. I am using the codes below. I could not succeed to write the correct sentence in place of the question marks. Do I need to make any changes in the source file also? I attached the original files published by Bruce Hanse

Re: [R] Extract part of a numer

2013-04-23 Thread David Winsemius
On Apr 23, 2013, at 12:13 PM, arun wrote: > Hi, > Try this: > set.seed(25) > dat1<- > data.frame(ID=c(10011001,10011004,20012001,2022001,12002),val=rnorm(5),stringsAsFactors=FALSE) > > dat2<- dat1 > library(stringr) > dat1$ID<-as.numeric(str_sub(dat1$ID,-4,-1)) > dat1 > #IDval > #

Re: [R] Hosmer Lemeshow test

2013-04-23 Thread Frank Harrell
The H-L test is now considered to be obsolete by many. One replacement is the Hosmer - le Cessie test as implemented in the rms package residuals.lrm function. This is a one degree of freedom test. One problem with H-L is its use of arbitrary binning and suboptimal power. The new test requires

Re: [R] Time and Date formatting

2013-04-23 Thread Ayyappa Chaturvedula
That works for me and thanks for the help. On Apr 23, 2013, at 2:59 PM, Rui Barradas wrote: > Hello, > > Forgot to add strptime, like you had noted. > > strptime(paste(DATE, TIME), format = "%d/%m/%Y %H:%M") > > > Rui Barradas > > Em 23-04-2013 19:54, Rui Barradas escreveu: >> Hello, >> >

Re: [R] Time and Date formatting

2013-04-23 Thread Jeff Newmiller
a) In some analyses, date/time values are only needed to identify data records, in which case a simple paste is enough. b) If you ARE going to need to to calculate or plot date/time and choose to use POSIXt types to represent it, make a habit of always setting your "local" (local to the compute

[R] lmer with only random effect

2013-04-23 Thread li li
Dear all, I want to fit a random effect model with only one random factor. I do not want to include the intercept term either. The model I using now is lmer(values ~ (1|lot), data=tmp) The results are as below. How do I take out the intercept term? Or if this is not possible for the lmer fu

[R] flexmix

2013-04-23 Thread R Project
Hi, I am trying to understand how to use the flexmix package, I have read the Leisch paper but am very unclear what is needed for the M-step driver. I am just fitting a simple linear regression model. The documentation is far from clear what the FLXmclust function does, but, it in principle c

Re: [R] Need to replicate Boltzman Signmodial Curve fit from Graph Pad

2013-04-23 Thread David Carlson
You may want to compare R's four point logistic with the results you get using Graphpad. For these data the Bottom parameter is not significantly different from zero (so the three point sigmoid might be adequate), but as Bert points out, especially with only 8 data points, it is probably overfittin

Re: [R] lmer with only random effect

2013-04-23 Thread Bert Gunter
What you want to do makes no sense. Would you care to explain why you think you want to do it? -- Bert On Tue, Apr 23, 2013 at 1:41 PM, li li wrote: > Dear all, > I want to fit a random effect model with only one random factor. I do not > want to > include the intercept term either. > The m

Re: [R] assigning cluster id in cluster package-reg.

2013-04-23 Thread Martin Maechler
Well, you don't give much of an example I'm replying CC to the R mailing list. Please ask questions there, rather than adressing individuals for basic help. Here is one; does it answer your question ? data(agriculture) ag.ag <- agnes(agriculture) class(ag.ag) pltree(ag.ag) # the dendrogram

Re: [R] GAM Penalised Splines - Intercept

2013-04-23 Thread Gavin Simpson
On Tue, 2013-04-23 at 17:51 +0200, Lucas Holland wrote: > Hey all, > > I'm using the gam() function inside the mgcv package to fit a > penalised spline to some data. However, I don't quite understand what > exactly the intercept it includes by default is / how to interpret > it. > > Ideally I'd

Re: [R] flexmix

2013-04-23 Thread Uwe Ligges
Can you please stop sending mails from "R Project"? Please identify yourself and don't call yourself "R Project". Uwe Ligges On 23.04.2013 22:54, R Project wrote: Hi, I am trying to understand how to use the flexmix package, I have read the Leisch paper but am very unclear what is neede

[R] help with execution of 'embarrassingly parallel' problem using foreach, doParallel on a windows system

2013-04-23 Thread Benjamin Caldwell
Dear R helpers, I have what another member on this forum described as an embarrassingly parallel problem. I am trying to fit models on subsets of some data based on unique combinations of two id factors in the dataset. Total number of combinations is 30^5, and this takes a long time. So, I would l

Re: [R] assigning cluster id in cluster package-reg.

2013-04-23 Thread Ramesh krishnan Ramasamy
Dear Sir, Thanks a lot for your reply. I have some doubts as follows, please clarify me... I am using codes from your reply (ck3 <- cutree(ag.ag, k = 3)) ## In this step we are cutting the tress and getting cluster assignments, on what basis you assigned k=3? (ch6 <- cutree(as.hclust(ag.ag), h =

[R] Regression on stratified count data

2013-04-23 Thread meng
Hi all: For stratified count data,how to perform regression analysis? My data: age case oc count 1 1 121 1 1 226 1 2 117 1 2 259 2 1 118 2 1 288 2 2 1 7 2 2 2 95 age: 1:<40y 2:>40y ca

[R] time from excel with XLConnect

2013-04-23 Thread Knut Krueger
When I read a time hh:mm:ss from a excel sheet with gdata read.xls it is as expected. When I read the time with readWorksheet I get 1899-12-31 00:20:00 UTC. I would prefer XLConnect because it does not nee perl installed but the data coming with XLConnect is not usable. _

Re: [R] matching observations and ranking

2013-04-23 Thread arun
Hi, It is not that clear. If VAR1 is a match between columns AB001A, AB0002A, VAR2  between AB001A, AB362 and VAR3 between AB0002A and AB362: Also, I assume row8 match would be taken as 1. dat1<- read.table(text="   S.No AB001A AB0002A AB362    1   -/-    C/C   A/A      

Re: [R] Regression on stratified count data

2013-04-23 Thread peter dalgaard
On Apr 24, 2013, at 06:15 , meng wrote: > Hi all: > For stratified count data,how to perform regression analysis? > > My data: > age case oc count > 1 1 121 > 1 1 226 > 1 2 117 > 1 2 259 > 2 1 118 > 2 1 288 > 2

[R] Simulate user input in R

2013-04-23 Thread Vahe nr
Dear all, Can we simulate user input in R ? for example if we have a function which needs an input from the user to continue its work, can we automate this step (simulate the input...) Here is the sample: choose between one of the grouping factor available : c("Village", "Country") we need to ent

[R] Understanding how nls() works

2013-04-23 Thread Patrick Connolly
I'm trying to understand what goes on in the process that nls() uses. This converges without much drama: > rate.nls <- nls(Dev ~ exp(rho * (T)) - exp(rho*Tmax - (Tmax - T)/del)+ + lam , data = xx, trace = TRUE, + start = c(rho = 0.15, del = 7, lam = .02, Tmax = 30)