Re: [R] 3-D (surface) B-splines

2008-10-22 Thread Dieter Menne
Wang, Zhaoming (NIH/NCI) [C] mail.nih.gov> writes: > Is there any R package which can do 3-D splines (reconstruct a surface interp in package akima. I you do not insist on splines, also check interp.loess (tgp ?). Dieter __ R-help@r-project.org maili

[R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-22 Thread R P Herrold
On Wed, 22 Oct 2008, Paulo Cortez wrote: This is becoming a nightmare and I am concluding that installing java1.6 in CentOS5 is particularly hard, specially if you installed previous jdk versions... If you have multiple versions present, you are going to have problems as the Sun Java release

Re: [R] Interpretation of t.test results

2008-10-22 Thread Fernando Marmolejo Ramos
Dear Omar Your t.test is telling that the 2 groups are not different. Now it is not clear if you want to compute the CI for the difference or for each group. If the former, then the outputs provides you with that information. It’d be clearer if you provide the full syntax of your t.test. For exam

Re: [R] [R-sig-hpc] torque/psb & snow library

2008-10-22 Thread Ei-ji Nakama
Hi, We built a small cluster in Debian and Torque and lam. It is 8cpu per the node in two node. Because it was troublesome to write as LoadLevelor,OpenPBS,LFS and Torque, we made I/F of Web. However, I understood that I said that it was more difficult to write a document. It is written to be cal

[R] Interpretation of t.test results

2008-10-22 Thread Omar Bahy Badreddin
I have run a t.test in R, and received these results: Two Sample t-test data: rsa and umple t = 0.9819, df = 10, p-value = 0.3493 alternative hypothesis: true difference in means is not equal to 0 95 percent confidence interval: -76.1541 196.1541 sample estimates: mean of x mean of y 50

Re: [R] code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?

2008-10-22 Thread Yihui Xie
I think you have to be either honest or careful, since the code you submitted to Rweb is different with your former code! Why the condition was changed from "test<-subset(X, GRADE == 7 & Y_Q10A < 9)" to "test<-subset(X, PROV==48 & GRADE == 7 & Y_Q10A < 9)"? By the way, please read the post guide

Re: [R] Spatstat help - quadratcount query

2008-10-22 Thread Adrian Baddeley
Gough, Lauren wrote: I am using quadratcount in spatstat to divide a window containing a point pattern into a grid of quadrats containing the intensity of points in each quadrat. However, when I look at the data for quadrat counts it seems the function is not keeping the size of the quad

Re: [R] A matrix automation problem

2008-10-22 Thread markleeds
megh: assuming that i understand what you want, i think below does it but check it carefully because i didn't. i = 1:9 a = matrix(1:9, 3) tempa <- lapply(i,function(.index) { a^.index }) tempb <- lapply(seq(1,dim(a)[1]*dim(a)[2],by=dim(a)[1]),function(.index) { do.call(rbind,tempa[.index

Re: [R] A matrix automation problem

2008-10-22 Thread megh
Thanks for your reply. Your solution is ok for this particular definition of bi = a * i . However I was looking for more general solution, like : bi = a *a*a*(i-times) Is there any better idea? Thanks and regards, Greg Snow-2 wrote: > > Does this help point you in a useful direction? > >>

Re: [R] Substitute problem

2008-10-22 Thread jim holtman
Had the test wrong in the last one' try this: > x X value row col ID n 1 1 11.105009 5511625 3463000 1 -619.1125 2 2 10.324148 5499625 3465000 01. 3 3 8.744591 5503625 3475000 01. 4 4 9.523473 5494625 3475000 3 -578.2354 5 5 8.856097 5507625 348 4

Re: [R] Substitute problem

2008-10-22 Thread jim holtman
Will this do it for you: > x X value row col ID n 1 1 11.105009 5511625 3463000 1 -619.1125 2 2 10.324148 5499625 3465000 01. 3 3 8.744591 5503625 3475000 01. 4 4 9.523473 5494625 3475000 3 -578.2354 5 5 8.856097 5507625 348 4 -619.1125 6 6 8.6368

Re: [R] plotting matrix

2008-10-22 Thread Gabor Grothendieck
Perhaps: for(i in 2:4) plot(g[c(1, i)]) On Wed, Oct 22, 2008 at 8:56 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > #this does what I want is there a better way to do this > a <- c(1:26) > b <- rnorm(26) > e <- rnorm(26) > f <- rnorm(26) > g <- data.frame(a,b,e,f) > > for(i in 1:3){ > plot(g[,i]

Re: [R] plotting matrix

2008-10-22 Thread stephen sefick
#this does what I want is there a better way to do this a <- c(1:26) b <- rnorm(26) e <- rnorm(26) f <- rnorm(26) g <- data.frame(a,b,e,f) for(i in 1:3){ plot(g[,i]~g[,"a"], ylab=colnames(g)[i]) } On Wed, Oct 22, 2008 at 6:39 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > #sorry lets try that ag

Re: [R] Help finding the proper function

2008-10-22 Thread Rolf Turner
Your terminology is confused. At least it confuses me. I think you are mixing up ``bivariate distributions'' and ``mixture'' (of two) distributions. What you get by rbinding x.1 and x.2 is a sample from a mixture of two *bivariate* (Gaussian) distributions, one with mean c(0,0), and one wi

[R] If I known d1 (density1), and dmix is a mix between d1 and d2 (d2 is unknown), can one infer d2?

2008-10-22 Thread Emmanuel Levy
Dear All, I hope the title speaks by itself. I believe that there should be a solution when I see what Mclust is able to do. However, this problem is quite particular in that d3 is not known and does not necessarily correspond to a common distribution (e.g. normal, exponential ...). However it mu

[R] Help finding the proper function

2008-10-22 Thread Tom.O
This might not be the correct forum for this question for there might be some flaws in my logic so the R function I'm looking for might not be the correct, but I know there’s a lot of smart people in this forum so please correct me if I'm wrong. I have been googling and searching in this forum for

Re: [R] extract bits of a character vector

2008-10-22 Thread jonas garcia
Thank you all for the useful responses. Problem solved! J On Thu, Oct 23, 2008 at 12:14 AM, Duncan Murdoch <[EMAIL PROTECTED]>wrote: > On 22/10/2008 5:02 PM, jonas garcia wrote: > >> Dear list: >> >> >> >> I have the following problem: From a vector like this: >> >> vec<- c("mud_1999_area_A", "g

Re: [R] Disabling the auto-complete feature in named list indexing

2008-10-22 Thread Peter Dalgaard
Pradheep K E wrote: Is there any way to disable the auto-complete feature when we index a named list? E.g: a <- list ('longname'=1, 'anothername'=2) a$l will return 1 and a$a will return 2 the '[[' operator behaves in the same way, the '[' operator does not do autocomplete. Is there any way to d

Re: [R] card games

2008-10-22 Thread Ted Harding
On 22-Oct-08 23:04:34, Barry Rowlingson wrote: > 2008/10/22 Erin Hodgess <[EMAIL PROTECTED]>: >> This is for programming purposes. >> >> I wanted my students to do some games, but I wanted to see if there >> were items already out there. > > A quick googling (oooh, if ONLY R was called something

Re: [R] extract bits of a character vector

2008-10-22 Thread Duncan Murdoch
On 22/10/2008 5:02 PM, jonas garcia wrote: Dear list: I have the following problem: From a vector like this: vec<- c("mud_1999_area_A", "gravel_2004_area_F") I would like to get the year in a separate vector, such y<- c("1999", "2004") I´ve been looking to grep() but I'm not sure how

[R] newbie Syntax questions: Re-Calculating expansion factors

2008-10-22 Thread Farley, Robert
I have a dataframe with many hundreds of survey records containing: tripid_nu, lineon, MuchOtherData, X1, X2, X3, X4 tripid_nu = identifier for each "Trip" {E.g. for EB MTA-901 leaving the first stop at 07:24} lineon = identifier for each of the stop locations Where X1 is

Re: [R] card games

2008-10-22 Thread Barry Rowlingson
2008/10/22 Erin Hodgess <[EMAIL PROTECTED]>: > This is for programming purposes. > > I wanted my students to do some games, but I wanted to see if there > were items already out there. A quick googling (oooh, if ONLY R was called something more googly!) found Duncan Murdoch's poker package: http

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
Many thanks to all for their help. Factors are indeed very tricky and sided on the conversion to character. Kind regards, Ivan On 22 Oct 2008, at 19:01, Duncan Murdoch wrote: On 10/22/2008 12:09 PM, Ivan Alves wrote: Dear all, Thanks for all the replies. I get something with Duncan's code (s

[R] Disabling the auto-complete feature in named list indexing

2008-10-22 Thread Pradheep K E
Is there any way to disable the auto-complete feature when we index a named list? E.g: a <- list ('longname'=1, 'anothername'=2) a$l will return 1 and a$a will return 2 the '[[' operator behaves in the same way, the '[' operator does not do autocomplete. Is there any way to disable autocomplete fo

[R] extract bits of a character vector

2008-10-22 Thread jonas garcia
Dear list: I have the following problem: From a vector like this: vec<- c("mud_1999_area_A", "gravel_2004_area_F") I would like to get the year in a separate vector, such y<- c("1999", "2004") I´ve been looking to grep() but I'm not sure how to do this. Help? Thanks in advance J

Re: [R] card games

2008-10-22 Thread Erin Hodgess
This is for programming purposes. I wanted my students to do some games, but I wanted to see if there were items already out there. Thanks, Erin On Wed, Oct 22, 2008 at 10:39 AM, Greg Snow <[EMAIL PROTECTED]> wrote: > Why do you want this? To play during a break? Or to demonstrate > probabili

Re: [R] plotting matrix

2008-10-22 Thread stephen sefick
#sorry lets try that agian here is data that should work a <- c(1:26) b <- rnorm(26) e <- rnorm(26) f <- rnorm(26) g <- data.frame(b,e, a,f) On Wed, Oct 22, 2008 at 6:35 PM, stephen sefick <[EMAIL PROTECTED]> wrote: > a <- c(1:26) > b <- rnorm(25) > e <- rnorm(25) > f <- rnorm(25) > g <- data.fra

[R] plotting matrix

2008-10-22 Thread stephen sefick
a <- c(1:26) b <- rnorm(25) e <- rnorm(25) f <- rnorm(25) g <- data.frame(b,e, a,f) I would like to plot a agianst all possibilities and then shoot it out to a pdf one graph per page. I think it would be okay to have this as a lattice plot or a ggplot with many graphs per page. I can figure all

Re: [R] forward stepwise regression using Mallows Cp

2008-10-22 Thread Frank E Harrell Jr
Essers, Jonah wrote: So I recognize that: 1. many people hate forward stepwise regression (i've read the archives)--but I need it Why? -Frank 2. step() or stepAIC are two ways to get a stepwise regression in R But here's the thing: I can't seem to figure out how to specify that I want t

[R] forecasting earnings, sales and gross margin of a company...

2008-10-22 Thread Michael
Hi all, I am playing with some companies' balance sheets and income statements and want to apply what I've just learned from Stats class to see if I can forecast the companies earnings, sales and gross margin in the short term (3rd and 4th Quarter), mid-term (2009) and long term (2011, etc. ) I p

Re: [R] lme4 question

2008-10-22 Thread Lawrence Hanser
Re Doug's comment: I apologize for being incomplete--I do know better. I did explicitly include a data statement in the models, but didn't write the model statements properly in my post. Here are the actual model statements: mod1 <- lmer(y ~ category + subcomp + (1 | id), data=prepchiefs08rm)

Re: [R] lme4 question

2008-10-22 Thread Douglas Bates
On Wed, Oct 22, 2008 at 4:18 PM, Lawrence Hanser <[EMAIL PROTECTED]> wrote: > Dear R Colleagues, > > I run the following two models: > > mod1 <- lmer(y ~ category + subcomp + (1 | id)) > mod2 <- lmer(y ~ category + subcomp + category*subcomp + (1 | id) > > where: > category has 4 possible values >

Re: [R] optim bug/help?

2008-10-22 Thread Ben Bolker
charter.net> writes: > > In the documentation for 'optim' it gives the following function: > > fr <- function(x) { ## Rosenbrock Banana function > x1 <- x[1] > x2 <- x[2] > 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 > } > optim(c(-1.2,1), fr) > > When I run this code I get: > > $par >

[R] lme4 question

2008-10-22 Thread Lawrence Hanser
Dear R Colleagues, I run the following two models: mod1 <- lmer(y ~ category + subcomp + (1 | id)) mod2 <- lmer(y ~ category + subcomp + category*subcomp + (1 | id) where: category has 4 possible values subcomp has 24 possible values id has approx 120 values (id is nested within category, and in

[R] help wiht contrasts for GLM

2008-10-22 Thread Susana Zuloaga
Hi I conducted a binomial GLM (with 3-factor) but I need to make a contrasts test between the averages of the treatments; I need know what treatment are equal. I know that the contrasts are used only in ANOVA I suppose that is incorrect doing this in a glm, there is some way to make contrasts m

Re: [R] Help with functions

2008-10-22 Thread jim holtman
It might be your return statement. Look up 'return' in the help file and you will see that you can only return a single value. If you want multiple values returned, use a list: return(listGmean,Gsd)) On Wed, Oct 22, 2008 at 11:53 AM, Alex99 <[EMAIL PROTECTED]> wrote: > > Hi there, > > I have a

Re: [R] Help with functions

2008-10-22 Thread Sarah Goslee
Hi, A repeatable example with data would help, as that way we could see what was happening. > > sampling=function(fname,Total,nSample,nPatient){ > trans=t(A) What's A? It isn't one of the arguments to your function. And what's the transpose of a non-existent thing? You may well have it in your

[R] optim bug/help?

2008-10-22 Thread rkevinburton
In the documentation for 'optim' it gives the following function: fr <- function(x) { ## Rosenbrock Banana function x1 <- x[1] x2 <- x[2] 100 * (x2 - x1 * x1)^2 + (1 - x1)^2 } optim(c(-1.2,1), fr) When I run this code I get: $par [1] 1.000260 1.000506 I am sure I am missing someth

Re: [R] Package survey

2008-10-22 Thread Thomas Lumley
I think this has already been fixed in version 3.9-1. Also, you probably want to add na.rm=TRUE to the call svyby(~p_igov,~div_a,desenho_nps,svytotal,drop.empty.groups=TRUE,vartype =c("se","var","cvpct"), na.rm=TRUE) otherwise the estimated total will be NA whenever any observation is NA.

Re: [R] Change background color in script window in Windows Rgui

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 12:52 PM, Greg Snow wrote: Does anyone know how to change the background color of the script window(s) in Rgui on Windows? I can use the "Gui Preferences" menu item under the Edit menu has an option that lets you change the background color for the console window and any help/inf

Re: [R] Problem about spawn nodes with Rmpi

2008-10-22 Thread Marce
2008/10/22 Markus Schmidberger <[EMAIL PROTECTED]> > > Hi Marce, > > there is a new mailing list for R and HPC: [EMAIL PROTECTED] > This is probably a better list for your question. > > Probably Rmpi does not find the correct Rmpi implementation. Have you > installed a second mpi implementation (la

[R] Question about R graphs

2008-10-22 Thread legendy
Hello all, I have a question about CODA. Using my R code as bellow, I drew two graphs (the data comes from the example of the speed of light in the Gelman’s book “Bayesian Data Analysis (Second edition)” (page 77)). My R code is: library(R2WinBUGS) y=c(28, 26, 33, 24, 34, -44, 27, 16, 40, -2,

Re: [R] code works in R desktop but not iin RWeb - How do I modify to get it working in RWeb, please?

2008-10-22 Thread Natalie O'Toole
Hi Yihui, Thank-you for this information. This is the code I am entering into RWeb after loading my data file: #subset the file to only include certain values: test<-subset(X, GRADE == 7 & Y_Q10A < 9) #sort the data by province and the variable Y_Q10A mydata<-test mydataSorted<-mydata[ orde

[R] Help with functions

2008-10-22 Thread Alex99
Hi there, I have a the following function which takes a name(fname), total number of rows (Total), number of times to make a sample(nSample), number of records/rows to be included in each sample(nPatient). then it generates required samples and calculates the mean and standard deviation of the c

[R] forward stepwise regression using Mallows Cp

2008-10-22 Thread Essers, Jonah
So I recognize that: 1. many people hate forward stepwise regression (i've read the archives)--but I need it 2. step() or stepAIC are two ways to get a stepwise regression in R But here's the thing: I can't seem to figure out how to specify that I want the criteria to be Mallow's Cp (and th

[R] 3-D (surface) B-splines

2008-10-22 Thread Wang, Zhaoming (NIH/NCI) [C]
Hello Is there any R package which can do 3-D splines (reconstruct a surface based 3-D data input) ? Thanks, Zhaoming __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-projec

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Julian Burgos
You could do something like this: > Name.x=c('nx1','nx2',NA,NA) > Name.y=c('ny1','NA','ny3',NA) > Name=Name.x > Name[is.na(Name.x)]=Name.y[is.na(Name.x)] > Name [1] "nx1" "nx2" "ny3" NA Julian Ivan Alves wrote: Dear all, I searched the mail archives and the R site and found no guidance (t

[R] Calculate individual R2n values

2008-10-22 Thread T.D.Rudolph
Does anyone know an alternate way of calculating R2n with spatial data other than converting values into ltraj format (adehabitat package)? I have a series of geographic xy coordinates (in metres). I imagine I can subtract x1y1 from x2y2 to get the spatial difference (dxdy), but what function

Re: [R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Werner Wernersen
Many thanks, Greg! Now I know why I thought that this does not work: I probably tried it with the string names of the columns and rows instead of their numbers. The former does not work (I think). Thanks to all again! Werner - Ursprüngliche Mail Von: Greg Snow <[EMAIL PROTECTED]>

Re: [R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Greg Snow
Subscript using a 2 column matrix with the rows in the first column and the cols in the 2nd column, e.g.: > x <- matrix(1:9, 3) > x[ cbind( c(1,2,3), c(3,2,1) ) ] [1] 7 5 3 Hope this helps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.40

Re: [R] Inserting blank lines into a file

2008-10-22 Thread Greg Snow
There is a basic interface to gnuplot in the TeachingDemos package (see the help on gp.open), but it does not do surface plots (yet, I am working on that). One way to create the datafile with gaps is: tmp <- 'nameofdatafile.txt' tmp2 <- data.frame(x=x, y=y, z=z) tmp2 <- t

Re: [R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Werner Wernersen
I thought I've tried this already and that it doesn't work -- madness. Anyway, Jeff kindly sent me the solution: m[cbind(c(1,2,3),c(1,3,1))] does the trick. Thanks, Werner Hi, this is probably a very trivial question but I can't figure out the right terms to find the solution in the list

[R] retrieving matrix elements by giving pairs of row AND column numbers?

2008-10-22 Thread Werner Wernersen
Hi, this is probably a very trivial question but I can't figure out the right terms to find the solution in the list archive. I have a matrix or a data.frame or the like: > m <- matrix(ncol=3,seq(1,9)) > m [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 and now I

Re: [R] Calculating confidence limits for the difference between

2008-10-22 Thread Ted Harding
On 22-Oct-08 17:09:27, Dennis Fisher wrote: > Colleagues, > I am working on a problem at the edge of my knowledge of statistics. > > Basically, I have values for two groups - I am trying to calculate the > 90% confidence limits for the difference between means. I can > implement this without d

[R] Inserting blank lines into a file

2008-10-22 Thread Zhou Fang
Hi, Should be a quickie: I want to make a datafile in R for plotting in gnuplot (which has friendlier 3D plotting options, as far as I can tell). So, I want to create a file with contents along the lines of #File begins 0 0 10 0 13 10 0.2 2 10 1 0 10.12 1 1 5 1 2 10 2 0 10 2 1 1 2 2 10 It's p

Re: [R] Weibull parameter estimation

2008-10-22 Thread Göran Broström
On Wed, Oct 22, 2008 at 1:57 PM, Borja Soto Varela <[EMAIL PROTECTED]> wrote: > Dear R-users > > I would like to fit weibull parameters using "Method of moments" in order to > provide the inital values of the parameter to de function 'fitdistr' . I > don`t have much experience with maths and I don'

Re: [R] Change background color in script window in Windows Rgui

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 12:52 PM, Greg Snow wrote: Does anyone know how to change the background color of the script window(s) in Rgui on Windows? I can use the "Gui Preferences" menu item under the Edit menu has an option that lets you change the background color for the console window and any help/inf

Re: [R] Saving kruskal wallis p-values

2008-10-22 Thread Greg Snow
Those are the results that print, not what you get. Try saving the results of the test in an object, then examine the saved object with the str function. Then reread the section in "An Introduction to R" on extracting pieces of lists. A reread of the help page for kruskal.test, specifically t

[R] Calculating confidence limits for the difference between means

2008-10-22 Thread Dennis Fisher
Colleagues, I am working on a problem at the edge of my knowledge of statistics. Basically, I have values for two groups - I am trying to calculate the 90% confidence limits for the difference between means. I can implement this without difficulty based on standard equations that are avail

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 12:09 PM, Ivan Alves wrote: Dear all, Thanks for all the replies. I get something with Duncan's code (slightly more compact than the other two), but of class "integer", whereas the two inputs are class "factor". Clearly the name information is lost. I did not see anything on

[R] Mirror/Package problems in R 2.8.0

2008-10-22 Thread M-J Milloy
Hello all, I've searched the lists and the web and not found an obvious answer to this; my apologies if I'm overlooking something. I've used 2.6.x for awhile; this morning, after installing 2.8.0 on my Mac OS X 10.5.5 machine, neither install.packages nor the "Packages & Data/Package Ins

[R] Change background color in script window in Windows Rgui

2008-10-22 Thread Greg Snow
Does anyone know how to change the background color of the script window(s) in Rgui on Windows? I can use the "Gui Preferences" menu item under the Edit menu has an option that lets you change the background color for the console window and any help/info windows that pop up, but the script wind

Re: [R] Complex Numbers and Bayesian Statistical Modelling.

2008-10-22 Thread Ben Bolker
Marcus Vinicius gmail.com> writes: > > Dear all, > Is there anyone that may help me to use complex numbers and Bayesian > Statistical Modelling? > Thanks a lot. > Best regards. > Marcus Vinicius > This is a very vague question with little clear connection to R. R has lots of capabilities fo

Re: [R] torque/psb & snow library

2008-10-22 Thread Luke Tierney
You may or may not see speed substantial improvements using Rmpi with (or without) snow but you might -- depends on how the cluster is configured, what version of MPI, etc. In my experience using snow with sockets, pvm, or LAM/MPI for typical computations running an a multi-core machine vs remote

Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard W Lisse
subkeys.pgp.net has 6 IP addresses, but all of them seem to have the key now. el On 22 Oct 2008, at 17:05 , Martyn Plummer wrote: Have you tried other keys? (mine is 97D3544E if you want to try). If nothing works then it is probably a firewall problem. Ask your network administrator if port

Re: [R] A matrix automation problem

2008-10-22 Thread Greg Snow
Does this help point you in a useful direction? > a <- matrix(1:9, 3) * 10 > b <- matrix(1:9, 3) > kronecker(b,a) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] 801.408.8111 > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMA

Re: [R] torque/psb & snow library

2008-10-22 Thread jgarcia
Thanks you! I'll look at this new list! Well, I'm not the system administrator, and my installation of Rmpi and/or pvm libraries for R crashes. As this is the first time I parallelize some jobs, snow appealed as a first approach because 1) it compiled correctly and 2) the use of the library is very

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
Dear all, Thanks for all the replies. I get something with Duncan's code (slightly more compact than the other two), but of class "integer", whereas the two inputs are class "factor". Clearly the name information is lost. I did not see anything on this in the help page for ifelse. On thi

Re: [R] Problem about spawn nodes with Rmpi

2008-10-22 Thread Markus Schmidberger
Hi Marce, there is a new mailing list for R and HPC: [EMAIL PROTECTED] This is probably a better list for your question. Probably Rmpi does not find the correct Rmpi implementation. Have you installed a second mpi implementation (lammpi)? How do you have installed Rmpi? Did you compiled it to the

Re: [R] torque/psb & snow library

2008-10-22 Thread Markus Schmidberger
Hi Javier, there is a new mailing list for R and HPC: [EMAIL PROTECTED] This is probably a better list for your question. I never tried torque with socket. We use torque and mpi or pvm (and R) and it is working very well. Why do you use socket as communication layer? MPI was especially developed

Re: [R] getting the "name" of an object

2008-10-22 Thread Peter Dalgaard
hadley wickham wrote: > On Wed, Oct 22, 2008 at 9:34 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > >> On 10/22/2008 10:02 AM, francois Guilhaumon wrote: >> >>> Hello, >>> >>> I'm looking for a way to get the "name" of an object when it is used >>> within an "sapply". >>> >>> More precisel

[R] Problem about spawn nodes with Rmpi

2008-10-22 Thread Marce
Hi all, now I'm testing R in a "virtual cluster", made it with VirtualBox. This one has 3 nodes, running CentOS 5 and OpenMPI 1.2.8, and the principal node (called "server") exports the /home to other nodes. I have installed R and OpenMPI in /home, in fact, it seems work OK. Editing the openmpi-def

Re: [R] card games

2008-10-22 Thread Greg Snow
Why do you want this? To play during a break? Or to demonstrate probabilities? Or to simulate games using different strategies? There are some functions with names like card.game in the kappalab package, but they don't look like they do the type of card game you play. If you just want to play

Re: [R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-22 Thread Martyn Plummer
Well this is interesting. I have a working java setup (using OpenJDK). But I can break it by running "R CMD javareconf -e". This command exports a number of JAVA_* environment variables. The rJava configure script uses these instead of querying R, but the compilation then fails. It seems that the

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 11:21 AM, Ivan Alves wrote: Dear all, I searched the mail archives and the R site and found no guidance (tried "merge", "cbind" and terms like "coalesce" with no success). There surely is a way to coalesce (like in SQL) columns in a dataframe, right? For example, I would li

Re: [R] coalesce columns within a data frame

2008-10-22 Thread Erik Iverson
Not tested, but for data.frame 'df', try df$coal <- ifelse(!is.na(df$Name.x), df$Name.x, df$Name.y) But see the help page for 'ifelse' regarding issues with classes, and the myriad R-help posts on the 'ifelse' function. Erik Ivan Alves wrote: Dear all, I searched the mail archives and the

Re: [R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Bert Gunter
Doug Bates is the authority of course, but perhaps a couple of quick inline comments may suffice: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mitchell Maltenfort Sent: Wednesday, October 22, 2008 7:41 AM To: r-help@r-project.org Subject: [R] Think I'm

[R] Saving kruskal wallis p-values

2008-10-22 Thread lave0083
Hi everyone, I am working on analyzing spectra which requires hundreds of kruskal wallis tests to be performed. Once significant results are found post tests are performed ect. My questions are: how do I perform all these kw tests and save just the pvalues in a table? Is there anyway to have R

Re: [R] suboptimal lp solutions

2008-10-22 Thread Peter Dalgaard
Selwyn McCracken wrote: > Hi list, > > I want to find the total maximum resources I can spend given a set > allocation proportion and some simple budget constraints. > > However, I get suboptimal results via lp and friends (i.e. lpSolve and > simplex in the linprog and boot) . > > For example: > >

Re: [R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Mitchell Maltenfort
Bert, you've been very helpful. It sounds like for my meagre needs, nlme is what I should stick with. However, I'll wait for Bates to weigh in on the pros and cons of each. Thanks! On Wed, Oct 22, 2008 at 11:23 AM, Bert Gunter <[EMAIL PROTECTED]> wrote: > Doug Bates is the authority of course,

[R] suboptimal lp solutions

2008-10-22 Thread Selwyn McCracken
Hi list, I want to find the total maximum resources I can spend given a set allocation proportion and some simple budget constraints. However, I get suboptimal results via lp and friends (i.e. lpSolve and simplex in the linprog and boot) . For example: library(lpSolve) proportions = c( 0.46, 0

[R] coalesce columns within a data frame

2008-10-22 Thread Ivan Alves
Dear all, I searched the mail archives and the R site and found no guidance (tried "merge", "cbind" and terms like "coalesce" with no success). There surely is a way to coalesce (like in SQL) columns in a dataframe, right? For example, I would like to go from a dataframe with two column

Re: [R] R Help

2008-10-22 Thread Boyce, Morgan
Thank you. This was very helpful. -Original Message- From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 21, 2008 6:22 PM To: Boyce, Morgan Cc: R-help@r-project.org Subject: Re: [R] R Help You can't mix character and numeric in a zoo object. Also note that lag.zoo c

Re: [R] GPG key not found [solved]

2008-10-22 Thread Renaud Gaujoux
It is solved. The query on http://keyserver.noreply.org/ with the key (E2A11821) does not work but typing "Vincent Goulet" works fine... Thanks a lot Martyn Plummer wrote: Have you tried other keys? (mine is 97D3544E if you want to try). If nothing works then it is probably a firewall problem

[R] Package survey

2008-10-22 Thread Rita Sousa
Hi, I’m using the svyby for total statistics, for example: svyby(~p_igov,~div_a,desenho_nps,svytotal,drop.empty.groups=TRUE,vartype =c("se","var","cvpct")) In the numerical variable p_igov (and others) I have many non responses but if I maintain the NA it doesn’t work. summary(base

[R] working with ROracle

2008-10-22 Thread sreejithpadmanabhan
Dear all, I am new to this stuff. I need to fetch certain values from the database and crate a curve fitting for the same using ROracle. I would like to know how to work with R for that. I have been able to do something with the code attached with this post. If anyone can help me in this regards,

Re: [R] Installing R in Linux: problems with JAVA packages (rJava, RWeka, ...) ?

2008-10-22 Thread Paulo Cortez
Thanks for the many answers I received. This is becoming a nightmare and I am concluding that installing java1.6 in CentOS5 is particularly hard, specially if you installed previous jdk versions... I tryed a wide range of solutions. I resume some of them: 1) Tryed to reinstall jdk1.6 and use

Re: [R] GPG key not found

2008-10-22 Thread Martyn Plummer
Have you tried other keys? (mine is 97D3544E if you want to try). If nothing works then it is probably a firewall problem. Ask your network administrator if port 11371 is blocked. When I had this problem, neither "gpg --recv-keys" nor the web interface at wwwkeys.pgp.net worked for me. Martyn O

Re: [R] Problem in Cart

2008-10-22 Thread Rahul-A.Agarwal
Hi, Sorry for the confusion but I am looking to use R for regression trees. My query is stated below and I am not able to understand how can I use tree library in this case Rahul Agarwal Analyst Equities Quantitative Research UBS_ISC, Hyderabad On Net: 19 533 6363 -Original Message-

Re: [R] GPG key not found

2008-10-22 Thread Renaud Gaujoux
All right, I'll wait and see then. Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, rep

Re: [R] getting the "name" of an object

2008-10-22 Thread hadley wickham
On Wed, Oct 22, 2008 at 9:34 AM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: > On 10/22/2008 10:02 AM, francois Guilhaumon wrote: >> >> Hello, >> >> I'm looking for a way to get the "name" of an object when it is used >> within an "sapply". >> >> More precisely, with a simple example : >> >> I have a

[R] Think I'm sure, but confirm: lme4 vs. nlme

2008-10-22 Thread Mitchell Maltenfort
The impression I get from the list and the references I've perused is that nlme is being phased out in favor of lme4, but lme4 still doesn't have a complete feature set yet. What I'm still fuzzy on, being a relative R newbie, is: (a) what features in nlme are currently missing in lme4 (b) what's

Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard Lisse
No, I did gpg --keyserver subkeys.pgp.net --recv-key E2A11821 I am getting broken packages unmet dependencies, but maybe it'll take a while for everything to propagate :-)-O el on 10/22/08 4:31 PM Renaud Gaujoux said the following: > Hi, > > well... that is what I would like to see indeed. :

[R] SVM, feature selection and parameter tuning

2008-10-22 Thread Stefan Koenig
Hi, Does anyone know why the package MCRestimate is not part of the BioConductor 2.2 anymore? I am looking for package doing support vector machine analyses including (i) variable/feature selection and (ii) parameter tuning in one learning period. Many thanks, Stefan --

Re: [R] getting the "name" of an object

2008-10-22 Thread Duncan Murdoch
On 10/22/2008 10:02 AM, francois Guilhaumon wrote: Hello, I'm looking for a way to get the "name" of an object when it is used within an "sapply". More precisely, with a simple example : I have a named list of objects : myList = list(a=rnorm(10),b=rnorm(10),c=rnorm(10)) I would like to creat

[R] suboptimal lp solutions

2008-10-22 Thread Selwyn McCracken
Hi list, I want to find the total maximum resources I can spend given a set allocation proportion and some simple budget constraints. However, I get suboptimal results via lp and friends (i.e. lpSolve and simplex in the linprog and boot) . For example: library(lpSolve) proportions = c( 0.46, 0

Re: [R] GPG key not found

2008-10-22 Thread Renaud Gaujoux
Hi, well... that is what I would like to see indeed. :( But I keep getting my error, what's bothering me is that the web-based tools also does not find the key... Did you also try on http://keyserver.noreply.org/? thanks Dr Eberhard Lisse wrote: gpg: requesting key E2A11821 from hkp server

Re: [R] GPG key not found

2008-10-22 Thread Dr Eberhard Lisse
gpg: requesting key E2A11821 from hkp server subkeys.pgp.net gpg: key E2A11821: public key "Vincent Goulet <[EMAIL PROTECTED]>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 on 10/22/08 3:42 PM Renaud Gaujoux said the following: > Hi,

[R] ad.test exponential distribution

2008-10-22 Thread eric lee
Hi, I'm trying to use ad.test or ad2.test to test whether a given data set is exponential. I see that one of the function inputs is "distn", but I try "exponential" and 5 other variants, but I still get the error message: ad.test(test2, distn="exponential", fit=list(estimate = 0.167685), H=NA, s

[R] getting the "name" of an object

2008-10-22 Thread francois Guilhaumon
Hello, I'm looking for a way to get the "name" of an object when it is used within an "sapply". More precisely, with a simple example : I have a named list of objects : myList = list(a=rnorm(10),b=rnorm(10),c=rnorm(10)) I would like to create a new object from each of the components of myList

  1   2   >