Re: [R] removing particular row from matrix

2012-02-22 Thread uday
Hi Dan, I am sorry about that it was typo mistake but the both values are -999.99 . your solution works. Thanks Uday -- View this message in context: http://r.789695.n4.nabble.com/removing-particular-row-from-matrix-tp4407401p4409513.html Sent from the R help mailing list archive at

Re: [R] installing the package Rcplex

2012-02-22 Thread Uwe Ligges
On 22.02.2012 03:33, zheng wei wrote: Thanks. I was just reminded by the tech support in my university that cplex is an independent software owned by ILOG, which in turn is now owned by IBM. I suceeded in installing the software cplex under the directory of C:/Program

Re: [R] Huge difference btw system time and elapsed time

2012-02-22 Thread Prof Brian Ripley
On 22/02/2012 07:53, Martin Maechler wrote: LS == Libo Sunlibo...@rams.colostate.edu on Tue, 21 Feb 2012 21:09:54 -0700 writes: Thanks. Shall I sum the user time and system time, which roughly equals to the elapsed time? No. Rather just use the user time, i.e.

Re: [R] barplot with both color and shading

2012-02-22 Thread Michael Bibo
Shi, Tao shidaxia at yahoo.com writes: Hi list, I want to draw a bar plot with color indicating one grouping and different shading on top of the color indicating another grouping.  How should I proceed? Thanks! ...Tao Does this help?

[R] [R-pkgs] new package 'bit64' - 1000x faster than 'int64' sponsored by Google

2012-02-22 Thread Jens Oehlschägel
Dear R-Core team, Dear Rcpp team and other package teams, Dear R users, The new package 'bit64' is available on CRAN for beta-testing and code-reviewing. Package 'bit64' provides fast serializable S3 atomic 64bit (signed) integers that can be used in vectors, matrices, arrays and

[R] package igraph function neighbors() pb with indices

2012-02-22 Thread Florence Combes
Dear all, I am using the package igraph and try to use the neighbors() function. I am a bit confused, see the following : Given a graph g with 18 vertices. Names of the vertices are indicated by : V(irt.graph)$name [1] AT2G41240 AT3G13610 AT3G02470 AT3G30775 AT3G18290 AT4G13770 AT1G01580

[R] Several densityplots in single figure

2012-02-22 Thread josh rosen
Hi, I have created two separate overlapping density plots- see example code below. What I wish now to do is combine them into one figure where they sit side by side. Any help would be great! many thanks in advance, josh. # thedataA -

[R] Loop

2012-02-22 Thread Florian Weiler
Dear all, I have a (probably very basic) question. I am imputing data with the mice package, using 10 chains. I can then write out the 10 final values of the chains simply by name1 - complete(imp, 1) : : name10 - complete(imp,10) Not a big deal, I

[R] how to make hash? append element, if i want following condition

2012-02-22 Thread sagarnikam123
i want hash like A : 1.2, 3.4, 4.5 B : 9.7, 5.6, 4.8 C : 3.4 ,5.7, 4.6 where A key contain all three value at right sight how to append single keys values if i have predefined hash with known length -- View this message in context:

[R] gamlss results for EXP and LNO seem to have reversed AIC scores

2012-02-22 Thread RdR
Hi, I'm a bit puzzled by the gamlss fitting of exponential and lognormal data. Gamlss seems to think that exponentially distributed data fits better with a lognormal distribution, and vice versa. For example, X - rexp(1000) Gexp - gamlss(X~1,family=EXP) # X~1 is X tilde 1 GAMLSS-RS

Re: [R] Error: object 'short' not found

2012-02-22 Thread kmittapalli
This finally worked- grid.draw( my.sgpd[[Goodness_of_Fit]][[READ.2006]][[i]] ) dev.off() On 2/21/2012 2:04 PM, David Winsemius [via R] wrote: On Feb 21, 2012, at 10:39 AM, kmittapalli wrote: should i keep the first line of the code like- pdf(file=Biology_2012_GOF. pdf, width=8.5,

[R] inserting a dataframe into the table

2012-02-22 Thread arunkumar1111
Hi, I have a dataset X Y A= 10 15 20 30 40 50 B = X Z 10 30 20 50 I have a table containing X Y Z columns How to insert a data frame into the table without using for loop ? now currently i'm using the for loop

Re: [R] Installing rgl

2012-02-22 Thread aoife
Hey guys,I'm working with R version 2.14.1 (2011-12-22) on a unix machine and I'm having a similar problem. I have a matrix and i want to do a simple correspondance analysis. I tried to install the ca package i get this error: library(ca) Loading required package: rgl Warning messages: 1: In

[R] Package 'fCalendar'

2012-02-22 Thread Britt Grt
Dear, I'm a master student mathematics at university Gent, who's writing a thesis about vines and copula's. I'm in trouble with the package 'fCalendar' which I need for running 'QRMlib'. The problem is that 'fCalendar' doesn't have a namespace. I need to use R.2.14.1 because I also need the

[R] Challenge

2012-02-22 Thread Silvano
Hi, I have the following equation: x1 + x2 + x3 - 2(x4 + x5 + x6) + 3(x7) = N each x_i can take any value: 1, 2, 3, 5, 6, 10, 15 or 30 and each one is different from each other. Which combination of values ??in the formula which leads to the smallest value of N? How can I program this

Re: [R] Loop

2012-02-22 Thread Helios de Rosario
-- Helios de Rosario Martínez Researcher El día 22/02/2012 a las 11:32, Florian Weiler fweile...@jhubc.it escribió: Dear all, I have a (probably very basic) question. I am imputing data with the mice package, using 10 chains. I can then write out the 10 final values of the chains

Re: [R] Challenge

2012-02-22 Thread Berend Hasselman
On 22-02-2012, at 13:49, Silvano wrote: Hi, I have the following equation: x1 + x2 + x3 - 2(x4 + x5 + x6) + 3(x7) = N each x_i can take any value: 1, 2, 3, 5, 6, 10, 15 or 30 and each one is different from each other. Which combination of values ??in the formula which leads to the

Re: [R] Installing rgl

2012-02-22 Thread aoife
Because for example I've done this: I made a simple table: A B C G1 1 34 231 G2 231 1 0.1 G3 12 0.0223 and ran a correspondance analysis on it using the ca package: library(ca) Loading required package: rgl Warning messages: 1:

Re: [R] sqlite create new unique id

2012-02-22 Thread Chris Campbell
Hi Alok Yes, last_insert_rowid() will always look for the last row inserted in this connection, so you will always get 0 before inserting a new row in a new connection. Maintaining the connection may cause other problems as the last inserted rowid might not be relevant to your query. Getting

[R] Week number from a date

2012-02-22 Thread arunkumar1111
Hi My data looks like this startDate=2008-06-01 dateRange =c( 2008-10-01,2008-12-01) Is there any method to find the week number from the startDate range - Thanks in Advance Arun -- View this message in context:

Re: [R] stepwise selection for conditional logistic regression

2012-02-22 Thread David Winsemius
On Feb 22, 2012, at 12:03 AM, Subha P. T. wrote: Hi David My data set has about 20 significant variables and step function with logistic regression is working fine( in R-commander). I tried to get conditional logistic by introducing the stratum variable and clogit. The clogit is not

Re: [R] stepwise selection for conditional logistic regression

2012-02-22 Thread Frank Harrell
Stepwise variable selection is an invalid statistical method. Who or which book recommended it? Frank Subha P. T. wrote  Hi, Is there any function available to do stepwise selection of variables in Conditional(matched) logistic regression( clogit)? step, stepwise  etc are failing in case

[R] Several densityplots in single figure

2012-02-22 Thread josh rosen
Hi, I have created two separate overlapping density plots- see example code below. What I wish now to do is combine them into one figure where they sit side by side. Any help would be great! many thanks in advance, josh. # thedataA -

Re: [R] Week number from a date

2012-02-22 Thread Ingmar Visser
?strptime is a good place to start hth, Ingmar On Wed, Feb 22, 2012 at 2:09 PM, arunkumar akpbond...@gmail.com wrote: Hi My data looks like this startDate=2008-06-01 dateRange =c( 2008-10-01,2008-12-01) Is there any method to find the week number from the startDate range -

Re: [R] Loop

2012-02-22 Thread Florian Weiler
Thanks for the answer, and sorry if I was not clear. So I run the data imputation using mice with 10 chains and then I get a mids-object. From that object I can then extract 10 data sets using the complete(imp, n) command (with n=c(1:10)). Now I can type this out 10 times: set1 - complete(imp,

Re: [R] Loop

2012-02-22 Thread Berend Hasselman
On 22-02-2012, at 14:40, Florian Weiler wrote: Thanks for the answer, and sorry if I was not clear. So I run the data imputation using mice with 10 chains and then I get a mids-object. From that object I can then extract 10 data sets using the complete(imp, n) command (with n=c(1:10)).

Re: [R] Installing rgl

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 04:51 -0800, aoife a écrit : Because for example I've done this: I made a simple table: A B C G11 34 231 G2231 1 0.1 G312 0.0223 and ran a correspondance analysis on it using the ca package:

Re: [R] Loop

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 05:40 -0800, Florian Weiler a écrit : Thanks for the answer, and sorry if I was not clear. So I run the data imputation using mice with 10 chains and then I get a mids-object. From that object I can then extract 10 data sets using the complete(imp, n) command

Re: [R] Several densityplots in single figure

2012-02-22 Thread David Winsemius
On Feb 22, 2012, at 5:28 AM, josh rosen wrote: Hi, I have created two separate overlapping density plots- see example code below. What I wish now to do is combine them into one figure where they sit side by side. Any help would be great! many thanks in advance, josh.

Re: [R] Week number from a date

2012-02-22 Thread Patrick Breheny
To give a little more detail, you can convert your character strings into POSIX objects, then extract from it virtually anything you would want using strftime. In particular, %W is how you get the week number: dateRange - c(2008-10-01,2008-12-01) x - as.POSIXlt(dateRange)

Re: [R] Logistic population growth and deSolve

2012-02-22 Thread Thomas Petzoldt
Hi Thomas, I've been out of office for a time, but maybe you are still waiting ... As far as I see your model is a correctly implemented ODE (!!!) system and I don't understand what you mean with unexpected results. Would it be possible that your original intention was not a *continuous*

Re: [R] inserting a dataframe into the table

2012-02-22 Thread Sarah Goslee
Hi, On Wed, Feb 22, 2012 at 4:47 AM, arunkumar akpbond...@gmail.com wrote: Hi, I have a dataset        X         Y A=   10      15        20      30        40      50 B =   X     Z        10   30        20     50 I have a table   containing X Y Z columns A table, or is this

Re: [R] variance explained in a cox ph model

2012-02-22 Thread Terry Therneau
--- begin included message --- I have a left truncated, right censored cox model: coxph(Surv(start, stop, censor) ~ x + y, mydata) I would like to know how much of the observed variance (as a number between 0 and 1) is explained by each variable. How could I do that? Adding terms sequentially

Re: [R] variance explained in a cox ph model

2012-02-22 Thread Federico Calboli
On 22 Feb 2012, at 14:01, Terry Therneau wrote: --- begin included message --- I have a left truncated, right censored cox model: coxph(Surv(start, stop, censor) ~ x + y, mydata) I would like to know how much of the observed variance (as a number between 0 and 1) is explained by each

Re: [R] Package 'fCalendar'

2012-02-22 Thread R. Michael Weylandt
I believe fCalendar was replaced by timeDate which does have a namespace and can be acquired from CRAN. Michael On Wed, Feb 22, 2012 at 5:41 AM, Britt Grt britt...@hotmail.com wrote: Dear, I'm a master student mathematics at university Gent, who's writing a thesis about vines and copula's.

Re: [R] CV for log normal data

2012-02-22 Thread Terry Therneau
If a variable y has (approximately) constant CV, then log(y) has (approximately) constant variance. So, use the standard deviation of the data. begin included message --- Hi, I have a microarray dataset from Agilent chips. The data were really log ratio between test samples and a universal

Re: [R] Loop

2012-02-22 Thread Florian Weiler
Thanks a lot all of you! @ Berend, your code works fine, thanks. @ Milan, you have a point there, makes sense to create 1 instead of 10 objects! -- View this message in context: http://r.789695.n4.nabble.com/Loop-tp4409865p4410444.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Several densityplots in single figure

2012-02-22 Thread josh rosen
thank you very much David! Can I follow up with a slight complication of this? A 2 by 2 case, where the abline is different in each plot. A relevant input code would be thedataA1 - data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data thedataB1 -

Re: [R] how to make hash? append element, if i want following condition

2012-02-22 Thread R. Michael Weylandt
The easiest way to get a hash structure is to use environments. hash1 - new.env() hash1$A - c(1.2, 3.4, 4.5) # etc. If I remember right there is a package on CRAN that abstracts some of this interface away (it's not the most intuitive) but this would likely be the core of it. Michael On Wed,

[R] Query: list within a list

2012-02-22 Thread Stefano Sofia
Dear R users, I have difficulty to create a list within a list. Example: with A - vector(mode=list, 4) I create a list of 4 elements: A [[1]] NULL [[2]] NULL [[3]] NULL [[4]] NULL In each element of this list I can store, for example, a matrix: A[[1]] - matrix ... I need each element of A

Re: [R] Query: list within a list

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 16:17 +0100, Stefano Sofia a écrit : Dear R users, I have difficulty to create a list within a list. Example: with A - vector(mode=list, 4) I create a list of 4 elements: A [[1]] NULL [[2]] NULL [[3]] NULL [[4]] NULL In each element of

Re: [R] Query: list within a list

2012-02-22 Thread R. Michael Weylandt
It's certainly possible and I don't think you get any grueling inefficiencies. along the way. Another way that might or might not make sense for you is to use a nifty trick I saw Gabor and Duncan M use a few weeks ago: you can give dimensionality to a list and then subset it in the normal ways:

Re: [R] Several densityplots in single figure

2012-02-22 Thread David Winsemius
On Feb 22, 2012, at 9:13 AM, josh rosen wrote: thank you very much David! Can I follow up with a slight complication of this? A 2 by 2 case, where the abline is different in each plot. A relevant input code would be thedataA1 - data.frame(x1=rnorm(100,1,1),x2=rnorm(100,3,1)) #create data

Re: [R] Week number from a date

2012-02-22 Thread Jan van der Laan
The suggestion below gives you week numbers with week 1 being the week containing the first monday of the year and weeks going from monday to sunday. There are other conventions. The ISO convention is that week 1 is the first week containing at least 4 days in the new year (week 1 of

Re: [R] Week number from a date

2012-02-22 Thread Gabor Grothendieck
On Wed, Feb 22, 2012 at 8:09 AM, arunkumar akpbond...@gmail.com wrote: Hi My data looks like this startDate=2008-06-01 dateRange =c( 2008-10-01,2008-12-01) Is there any method to find the week number from the startDate range Is the question how many weeks are from the startDate to

Re: [R] Loop

2012-02-22 Thread Eik Vettorazzi
Hi Florian, 'yet that doesn't work' is an improper question on this list, see the posting guide. Besides that, something like set-vector(mode = list, length = 10) for (i in 1:10){ set[[i]] - complete(imp,i)} or saving some typing set-lapply(1:10,function(i)complete(imp,i)) should work.

Re: [R] Using earth.dist function

2012-02-22 Thread cmartin
Thanks so much for the good advice. I was able to get the function to work. Cloe -- View this message in context: http://r.789695.n4.nabble.com/Using-earth-dist-function-tp4407892p4410920.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] how to make hash? append element, if i want following condition

2012-02-22 Thread sagarnikam123
i did it, but using hash package ,i got error like hash1 - new.env() hash1$A - c(1.2, 3.4, 4.5) hash1$A [1] 1.2 3.4 4.5 h-hash(keys=c(A,B),values=c(hash1$A,hash1$A) ) Error in .set(h, ...) : Keys of length 2 do not match values of length 6 how should i proceed -- View this message in

Re: [R] Installing rgl

2012-02-22 Thread aoife
Thank you for the reply, my problem is that i don't understand the error that plot(ca) is giving me: plot(ca) Error in matrix(as.matrix(obj), nrow = I, ncol = J) : non-numeric matrix extent so just to put this in context: my workscreen looks like this: table A B C G1 1 34.00

Re: [R] how to make hash? append element, if i want following condition

2012-02-22 Thread slre
sagarnikam123 wrote i did it, but using hash package ,i got error like hash1 - new.env() hash1$A - c(1.2, 3.4, 4.5) hash1$A [1] 1.2 3.4 4.5 h-hash(keys=c(A,B),values=c(hash1$A,hash1$A) ) Error in .set(h, ...) : Keys of length 2 do not match values of length 6 how should i

Re: [R] barplot with both color and shading

2012-02-22 Thread Shi, Tao
Thank you both, Michael and Jim, for the answers! - Original Message - From: Michael Bibo michael_b...@health.qld.gov.au To: r-h...@stat.math.ethz.ch Cc: Sent: Wednesday, February 22, 2012 12:46 AM Subject: Re: [R] barplot with both color and shading Shi, Tao shidaxia at

Re: [R] counts

2012-02-22 Thread Rui Barradas
Hello, Just look at your second 'apply': the 'function(x)' is not using the 'x' (!) Solution: function(x) hist(x, breaks=0:nrow(test), plot=FALSE)$counts) Note that instead of 'nrow' you could also use 'length(x)'. Hope this helps, Rui Barradas -- View this message in context:

[R] Optim() maximum number of parameters

2012-02-22 Thread Rainer Haidinger
Hello, I'm trying to maximize a likelihood function for a HMM with the optim() function using the Nelder-Mead Method. The LLF has 20 Parameters which are to be estimated. We found out that R changes some variables but not all of them, especially the last 2 parameters aren't changed. I already

Re: [R] Huge difference btw system time and elapsed time

2012-02-22 Thread Libo Sun
Thanks. I also did some parallel computing. Here are some time I spent by using 'snowfall' package on intel centrino 2 laptop (2 cores) on windows 7. user system elapsed 0.240.05 2442.77 Libo On Wed, Feb 22, 2012 at 12:53 AM, Martin Maechler maech...@stat.math.ethz.ch wrote: LS

Re: [R] Several densityplots in single figure

2012-02-22 Thread ilai
On Wed, Feb 22, 2012 at 8:49 AM, David Winsemius dwinsem...@comcast.net wrote: After going back and constructing a proper dataset, you should be passing 'groups' into the panel function and picking it up inside panel.abline. Close, but unfortunately things get more complicated when using

[R] line width in legend of interaction.plot

2012-02-22 Thread Matthias Gondan
Dear R developers, The following command produces an interaction plot with lwd=2. interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=2) In the legend, however, lwd seems to be 1, which does not seem to be intended behavior. Probably the lwd is not correctly forwarded to legend: from the

Re: [R] Installing rgl

2012-02-22 Thread R. Michael Weylandt
I haven't been following this thread so I may be off base, but are you sure you don't mean plot(ca(table))? ca is a function from the ca package -- you want to plot the output of the function, not the function itself. Sorry if this is unhelpful, Michael On Wed, Feb 22, 2012 at 10:02 AM, aoife

Re: [R] Installing rgl

2012-02-22 Thread ilai
On Wed, Feb 22, 2012 at 3:23 AM, aoife aoife.m.dohe...@gmail.com wrote: Hey guys,I'm working with R version 2.14.1 (2011-12-22) on a unix machine You may be missing some openGL libraries (mesa ? ) On Ubuntu, this solved my problem of installing rgl: sudo apt-get build-dep r-cran-rgl Can't vouch

Re: [R] Repeated cross-validation for a lm object

2012-02-22 Thread samuel-rosa
Dear Max and Greg Thank you for your help. Unfortunately I was not able in getting what I need using the functions you suggested. I believe it can be a result of my inexperience with the packages caret and rms. Therefore, I provide more information about my problem and wish you can again provide

Re: [R] removing particular row from matrix

2012-02-22 Thread uday
Hi Petr, Thanks for reply sorry for late message there was typo error the both values are -999.99 a[rowSums(a == -999.99) == 0, ], this solution works only if we have to remove certain value from matrix. but if a-matrix(c(1,2,3,5,-999.99,5,-999.99,6,1,5,9,1),nrow=4) a [,1][,2]

[R] Gamm and post comparison

2012-02-22 Thread RHam
My data set consist of number of calls (lcin) across Day. I am looking for activity differences between three features (4 sites per feature). I am also looking for peaks of activity across time (Day). I am using a gamm since I believe these are nonlinear trends with nested data.

Re: [R] line width in legend of interaction.plot

2012-02-22 Thread ilai
On Wed, Feb 22, 2012 at 11:37 AM, Matthias Gondan matthias-gon...@gmx.de wrote: Dear R developers, The following command produces an interaction plot with lwd=2. interaction.plot(c(1, 2, 1, 2), c(1, 1, 2, 2), 1:4, lwd=2) In the legend, however, lwd seems to be 1, which does not seem to be

Re: [R] removing particular row from matrix

2012-02-22 Thread R. Michael Weylandt
all you need is rowSums(a == -999.99) -- this will check for -999.99 in *any* spot. If you do only want to check a certain column/row, add drop=FALSE to your subscripting. Michael On Wed, Feb 22, 2012 at 1:50 PM, uday uday_143...@hotmail.com wrote: Hi Petr, Thanks for reply sorry for late

[R] Multiple lines for each record: how do I handle that

2012-02-22 Thread Luca Meyer
Hi Folks, I just discovered that my dataset (coming from QuestionPro platform) has got multiple lines for each respondent id, but what I would really need is a regular data matrix where each respondent's data is shown on a single line. Does anyone has already develop a procedure that

Re: [R] Multiple lines for each record: how do I handle that

2012-02-22 Thread Sarah Goslee
If you provide a small reproducible example of your data format and expected output, I'm sure someone here can offer a useful solution. Without knowing what your data look like, not so easy. Sarah On Wed, Feb 22, 2012 at 2:22 PM, Luca Meyer lucam1...@gmail.com wrote: Hi Folks, I just

Re: [R] removing particular row from matrix

2012-02-22 Thread Sarah Goslee
Is this not what you want: a[a[,2] != -999.99,] I didn't see the earlier message so I'm not sure how rowSums was involved. Sarah On Wed, Feb 22, 2012 at 1:50 PM, uday uday_143...@hotmail.com wrote: Hi Petr, Thanks for reply sorry for late message there was typo error the both values are

Re: [R] Installing rgl

2012-02-22 Thread Milan Bouchet-Valat
Le mercredi 22 février 2012 à 14:00 -0500, R. Michael Weylandt a écrit : I haven't been following this thread so I may be off base, but are you sure you don't mean plot(ca(table))? ca is a function from the ca package -- you want to plot the output of the function, not the function itself.

[R] Good and modern Kernel Regression package in R with auto-bandwidth?

2012-02-22 Thread Michael
Hi all, I am looking for a good and modern Kernel Regression package in R, which has the following features: 1) It has cross-validation 2) It can automatically choose the optimal bandwidth 3) It doesn't have random effect - i.e. if I run the function at different times on the same data-set, the

Re: [R] Multiple lines for each record: how do I handle that

2012-02-22 Thread Luca Meyer
Sure, I am sorry I have not done that in the first place. The datasets I have looks like: id - c(1,1,2,2,2,3) v1 - c(NA,1,NA,1,NA,1) v2 - as.character(c(yes,,no,,,yes)) v3 - as.factor(c(NA,1,NA,NA,3,2)) d0 - data.frame(id,v1,v2,v3) d0 What I would need is to derive a dataset that looks like:

Re: [R] Multiple lines for each record: how do I handle that

2012-02-22 Thread Jorge I Velez
Hi Luca, Thank you for the example. Here is one way of doing what you want (of course there are many of them!): # data d0 - structure(list(id = c(1, 1, 2, 2, 2, 3), v1 = c(NA, 1, NA, 1, NA, 1), v2 = structure(c(3L, 1L, 2L, 1L, 1L, 3L), .Label = c(, no, yes), class = factor), v3 =

[R] How do I save the current session?

2012-02-22 Thread Ajay Askoolum
savehistory() gives me the option of saving the executable lines only. I'd like to save everything. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] installing the package Rcplex

2012-02-22 Thread zheng wei
Based on my understanding of the manual, I moved upziped the file and put the folder of Rcplex under the directory of c:/temp Then I use cmd under windows to go to the director of C:\Program Files\R\R-2.13.0\bin, where my R is installed and typed R CMD INSTALL c:/temp/Rcplex I got the error of

[R] rank with uniform count for each rank

2012-02-22 Thread Ben quant
Hello, What is the best way to get ranks for a vector of values, limit the range of rank values and create equal count in each group? I call this uniform ranking...uniform count/number in each group. Here is an example using three groups: Say I have values: x = c(3, 2, -3, 1, 0, 5, 10, 30, -1,

Re: [R] rank with uniform count for each rank

2012-02-22 Thread Sarah Goslee
Hi, On Wed, Feb 22, 2012 at 4:01 PM, Ben quant ccqu...@gmail.com wrote: Hello, What is the best way to get ranks for a vector of values, limit the range of rank values and create equal count in each group? I call this uniform ranking...uniform count/number in each group. Here is an example

Re: [R] rank with uniform count for each rank

2012-02-22 Thread David Winsemius
On Feb 22, 2012, at 4:01 PM, Ben quant wrote: Hello, What is the best way to get ranks for a vector of values, limit the range of rank values and create equal count in each group? I call this uniform ranking...uniform count/number in each group. Here is an example using three groups:

Re: [R] rank with uniform count for each rank

2012-02-22 Thread Ben quant
Thank you everyone! We already use the Hmisc package so I'll likely use cut2. Ben On Wed, Feb 22, 2012 at 2:22 PM, David Winsemius dwinsem...@comcast.netwrote: On Feb 22, 2012, at 4:01 PM, Ben quant wrote: Hello, What is the best way to get ranks for a vector of values, limit the range

[R] Generate a Weibull regression data

2012-02-22 Thread FU-WEN LIANG
Hi all, I'm trying to generate a Weibull distribution including four covariates in the model. Here is the code I used: # Generate survival time T = rweibull(200, shape=1.3, scale=0.004*exp(-(-2.5*b1+2.5*b2+0.9*x1-1.3*x2)/1.3)) C = rweibull(n, shape=1.5, scale=0.008) #censoring time time =

Re: [R] Multiple lines for each record: how do I handle that

2012-02-22 Thread Luca Meyer
Hi Jorge, The method you suggest is indeed working fine on the small sample data set. When I apply to a larger dataset (714 rows by 160 columns) it transforms some variables from factor to list, how can I change it back to their original class in an automatic way? Thanks, Luca Il giorno

[R] xtable prcomp

2012-02-22 Thread Riccardo Romoli
Hi, I need to export to LaTex the summary of a PCA. So: myPCA - prcomp(myDF) mySummary - summary(myPCA) # print(xtable(mySummary)) How can I export to LaTeX not all the summary but only the first nPCs?? Best Riccardo __ R-help@r-project.org mailing

[R] Writting to global variable in using doSNOW on multiple cores?

2012-02-22 Thread Michael
Hi all, Is there a problem when accessing/writing to global variable in using doSNOW package on multiple cores? In the below program, each of the MyCalculations(ii) writes to the ii-th column of the matrix globalVariable... Do you think the result will be correct? Will there be hidden catches?

Re: [R] tapply for enormous (2^31 row) matrices

2012-02-22 Thread ilai
On Tue, Feb 21, 2012 at 4:04 PM, Matthew Keller mckellerc...@gmail.com wrote: X - read.big.matrix(file.loc.X,sep= ,type=double) hap.indices - bigsplit(X,1:2) #this runs for too long to be useful on these matrices #I was then going to use foreach loop to sum across the splits identified by

Re: [R] Good and modern Kernel Regression package in R with auto-bandwidth?

2012-02-22 Thread Bert Gunter
Would you like it to do your your taxes for you too? :-) Bert Sent from my iPhone -- please excuse typos. On Feb 22, 2012, at 11:46 AM, Michael comtech@gmail.com wrote: Hi all, I am looking for a good and modern Kernel Regression package in R, which has the following features: 1)

Re: [R] Repeated cross-validation for a lm object

2012-02-22 Thread samuel-rosa
Dear Max Thank you for your attention. The train function in the caret package realy does what I need. Best regards, - Bc.Sc.Agri. Alessandro Samuel-Rosa Postgraduate Program in Soil Science Federal University of Santa Maria Av. Roraima, nº 1000, Bairro Camobi, CEP 97105-970 Santa Maria,

[R] LSA package: problem with textmatrix()

2012-02-22 Thread Ashton, Triss
I have a problem with the textmatrix() function of the LSA package whenever I specify 'removeNumbers=TRUE'. The data for the function are stored in a directory LSAwork which consists of a series of files that houses the text in column form. As long as removeNumbers = FALSE or it is not

[R] Lattice and horizontally stacked density plots

2012-02-22 Thread Manish Nag
Hello, I am try to make a density plot where plots are stacked like the one found here: http://dsarkar.fhcrc.org/lattice/book/images/Figure_14_03_stdBW.png I am facing problems, however. Using the code example below, I'd like to generate a separate panel for each val of id2. Within each panel,

Re: [R] R package built with Fortran code

2012-02-22 Thread MacQueen, Don
As far as I know, you must convert your main program into a subroutine. In my experience, this consist mostly if not entirely of converting user input from prompts to subroutine arguments. -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550

Re: [R] how to merge commands

2012-02-22 Thread MacQueen, Don
Are you absolutely certain that the data must be stored in Excel? In the long run I believe you will find it easier if the data is stored in an external database, or some other data repository that does not require you to read so many separate files. Probably the best you can hope for as it is

[R] Using R to read Nortek Aquadopp Profiler

2012-02-22 Thread Vinny Moriarty
Hello, I have current data from a nortek ADP, which is basically current speed and direction data in a 3 dimensional X Y Z format http://www.nortekusa.com/usa/products/current-profilers/aquadopp-profiler-1 The instrument logs data in a complex way and I was wondering if anyone has had any

[R] How can I save plot()/points() using SHP files into KML format?

2012-02-22 Thread gztourek
Hi, I am new to R and am a very basic user. I'm importing SHP files, adding plots of random locations within my polygon (these files have GPS data), and then want to save these plots (intact with added points) as KML files to look at in GoogleEarth (or possibly as SHP files which I can then

[R] Median In Survival

2012-02-22 Thread niloo javan
hi I have a problem with  Median in Survival. when I use S1=survfit(Surv(Time,Status)) the result shows the median but I cannot use it as numeric! S1$median in Null   Could u pleas help me. Many Many Tank You. Niloofar. [[alternative HTML version deleted]]

[R] why is generating the same graph???

2012-02-22 Thread Vanúcia Schumacher
Hi, why my script iss always generating the same graph?when I change the parameters and the name of text file? library(MASS) dados-read.table(inverno.txt,header=FALSE) vento50-fitdistr(dados[[1]],densfun=weibull) png(filename=invernoRG.png,width=800,height=600) hist(dados[[1]], seq(0, 18, 0.5),

[R] best R command to assess SNP-covariates logistic regression

2012-02-22 Thread Kyoto 812
Good morning In case control study I do have 35 covariates (personal and environmental details about the patients) and genotype data for 50 SNPs I need to apply all the covariates and one SNP at a time in the logistic regression model How can i do this in R ? I have the Covariate file and

[R] Issue with RODBC

2012-02-22 Thread Jadhav, Alok
Hi team, My RODBC connection times out after certain period (while creating a new channel). Is there a way to set a different value for timeout property? I looked into RODBC document and I didn't find any such property. I am trying to connect to a Sybase database. Maybe I can use something

[R] how to make gwaa.data

2012-02-22 Thread Kyoto 812
How to make the gwaa.data file I have the genotype data in plink format As binary and as text file Can anyone assist me ? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Median In Survival

2012-02-22 Thread David Winsemius
On Feb 22, 2012, at 6:59 PM, niloo javan wrote: hi I have a problem with Median in Survival. when I use S1=survfit(Surv(Time,Status)) the result shows the median but I cannot use it as numeric! S1$median in Null That does not look like a formula. Furthermore I do not think there is an

Re: [R] why is generating the same graph???

2012-02-22 Thread David Winsemius
On Feb 22, 2012, at 7:08 PM, Vanúcia Schumacher wrote: Hi, why my script iss always generating the same graph?when I change the parameters and the name of text file? library(MASS) dados-read.table(inverno.txt,header=FALSE) vento50-fitdistr(dados[[1]],densfun=weibull)

Re: [R] sqlite create new unique id

2012-02-22 Thread Jadhav, Alok
Thanks for the information. In my case I know that the rows will never be deleted so logically I could use max(rowid), but I am going to stick to my original solution of using a table to get the max id. But there is no in built table to maintain this, I will have to create a new table and maintain

Re: [R] Good and modern Kernel Regression package in R with auto-bandwidth?

2012-02-22 Thread Liaw, Andy
Bert's question aside (I was going to ask about laundry, but that's much harder than taxes...), my understanding of the situation is that optimal is in the eye of the beholder. There were at least two schools of thought on which is the better way of automatically selecting bandwidth, using

Re: [R] convert zoo object to standard R object so I can plot and output to csv file

2012-02-22 Thread Henry
Gabor, Thanks very much. I have all the zoo functions to get 1 minute aggregation and 15 min. means working and now able to write out to a file/etc. One question on the 15 min. mean results. m1 - times(00:01:00) g - seq(trunc(start(z),m1),end(z),by = m1) z1-na.approx(z,xout = g) m15 -

[R] Improving performance of split-apply problem

2012-02-22 Thread Martin
Hello, I'm very new to R so my apologies if I'm making an obvious mistake. I have a data frame with ~170k rows and 14 numeric variables. The first 2 of those variables (let's call them group1 and group2) are used to define groups: each unique pair of (group1,group2) is a group. There are roughly

  1   2   >