Re: [R] How to Plot Two Curves Into One Page

2011-01-31 Thread BSanders
abline() or lines() -- View this message in context: http://r.789695.n4.nabble.com/How-to-Plot-Two-Curves-Into-One-Page-tp3250546p3250568.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.e

[R] (no subject)

2011-01-31 Thread karuna m
Dear R-help, I am doing clustering via finite mixture model. Please suggest some packages in R to find clusters via finite mixture model with continuous variables. And also I wish to verify the distributional properties of the mixture distributions by fitting the model with lognormal, gamma, ex

Re: [R] How to Plot Two Curves Into One Page

2011-01-31 Thread BSanders
par(mfrow=c(3,2)) ## will get you 3 rows and 2 columns -- View this message in context: http://r.789695.n4.nabble.com/How-to-Plot-Two-Curves-Into-One-Page-tp3250546p3250567.html Sent from the R help mailing list archive at Nabble.com. __ R-h

[R] How can I index multiple linear models? (Without getting a warning.)

2011-01-31 Thread BSanders
My code looks like this: lin = NA for(i in 1:15){ lin[i] = lm(reservesub[,3]~ reservesub[,i+3]) } For which I'm given 15 warning messages which say : "1: In lin[i] = lm(reservesub[, 3] ~ reservesub[, i + 3]) : number of items to replace is not a multiple of replacement length" I'm am abl

Re: [R] How can I index multiple linear models? (Without getting a warning.)

2011-01-31 Thread Dieter Menne
BSanders wrote: > > > . > lin[i] = lm(reservesub[,3]~ reservesub[,i+3]) > > For which I'm given 15 warning messages which say : > > "1: In lin[i] = lm(reservesub[, 3] ~ reservesub[, i + 3]) : > number of items to replace is not a multiple of replacement length" > lin = list() for(i

Re: [R] how to check if a library is loaded, from a function

2011-01-31 Thread Prof Brian Ripley
On Mon, 31 Jan 2011, Nick Matzke wrote: Hi, I've written a function which I load with a source command. The function requires a certain library, phangorn, to work. Do you mean an R package or an OS library (aka DLL)? I'll assume the former, but please do use accurate terminology. I woul

Re: [R] list.files() error message: 'translateCharUTF8' must be called on a CHARSXP

2011-01-31 Thread Prof Brian Ripley
On Mon, 31 Jan 2011, MacQueen, Don wrote: I'm using list.files() on my home directory, like this: crnt.files <- list.files(dir.to.check, full.names=TRUE, all.files=TRUE, recursive=TRUE) With dir.to.check set to the full path to my home directory. After a while I get: Error in list.files(di

Re: [R] How to Plot Two Curves Into One Page

2011-01-31 Thread Gundala Viswanath
Dear Jorge, Thanks for the reply. But what I mean is to create plot on "top" of another in to one page. So in the end there will be only one plot with two curves. Actually what I am to plot is two ROC curves. - G.V. On Tue, Feb 1, 2011 at 3:37 PM, Jorge Ivan Velez wrote: > Hi Gundala, > Yes.

Re: [R] sum the values in a vector as a complete number

2011-01-31 Thread Jorge Ivan Velez
Hi AD, You might try the following: # data a <- c(2,3,5) b <- c(8,7) # you got this wrong ;) # option 1 foo <- function(x) as.numeric(paste(x, sep = "", collapse = "")) # examples foo(a) # [1] 235 foo(b) # [1] 87 foo(a) + foo(b) # [1] 322 # option 2 foo2 <- function(x, y) foo(x) + foo(y) #

Re: [R] sum the values in a vector as a complete number

2011-01-31 Thread Erik Iverson
I am trying to create a function that is able to calculate this sum: a<-c(2,3,5) b<-(8,7) with "a" meaning 235 and "b" 87. So the result of this sum would be 235 + 87 = 322. a <- c(2,3,5) b <- c(8,7) vectorToScalar <- function(x) { as.numeric(paste(x, collapse = "")) } vectorToScalar(a)

[R] How to Plot Two Curves Into One Page

2011-01-31 Thread Gundala Viswanath
I have a R script that contain these lines for plotting: plot(foo,lwd=2,lty=3,col="red", main=""); plot(bar,lwd=2,lty=3,col="blue"); legend(0.6,0.6,c('Default','Probabilistic'), col=c('red','blue'),lwd=3); But it generate 1 file (Rplot.pdf) with two pages. Each page for 1 plot. Is there a way I

Re: [R] rgl: draw multiple ellipsoids

2011-01-31 Thread Ben Bolker
baptiste auguie googlemail.com> writes: > > Dear list, > > I'm trying to visualise some ellipsoidal shapes in 3D. Their position, > axes, and angular orientation can be arbitrary. I saw an ellipse3d > function in rgl; however it is heavily oriented towards the > statistical concept of ellipse o

Re: [R] how to check if a library is loaded, from a function

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 11:04 PM, Nick Matzke wrote: Hi, I've written a function which I load with a source command. The function requires a certain library, phangorn, to work. I would like the function to check if phangorn is loaded as a library before running. For some reason, just putti

Re: [R] Generic Functions and Dates

2011-01-31 Thread Martin Morgan
On 01/31/2011 12:15 PM, Elliot Joel Bernstein wrote: > I'm trying to write a generic function that calls different methods > depending on the structure of the argument, but not the exact type of > its contents. For example, the function 'nan2last' below works for a > numeric vector but not for a ve

[R] sum the values in a vector as a complete number

2011-01-31 Thread ADias
Hi I am trying to create a function that is able to calculate this sum: a<-c(2,3,5) b<-(8,7) with "a" meaning 235 and "b" 87. So the result of this sum would be 235 + 87 = 322. I've searched a function like strsplit but that worked for integers and in reverse - not spliting but combining. Can

Re: [R] List of List in Data Frame

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 8:45 PM, Gundala Viswanath wrote: Dear sirs, I have a data that is generated like this: dat1 <- data.frame(V1 = rep(1, 5), V2 = sample(c(40:45), 5)) dat2 <- data.frame(V1 = sample(c(0,1), 5, replace = TRUE), V2 = sample(c(40:45), 5, replace = TRUE)) What I want to do

Re: [R] Simple Boxplot Question- unexpected string constant error

2011-01-31 Thread Dennis Murphy
Hi: Put an equals sign between xlab and ' Dennis On Mon, Jan 31, 2011 at 6:39 PM, MarquisDM wrote: > > Hi everyone, > > Sorry for the newbie question but whenever I enter the following code into > r > it gives me an unexpected string constant in > "boxplot(Abs~Conc,ylab='Absorbency',xlab'Etha

Re: [R] Simple Boxplot Question- unexpected string constant error

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 9:39 PM, MarquisDM wrote: boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)') missing "="..^. David Winsemius, MD West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailma

[R] how to check if a library is loaded, from a function

2011-01-31 Thread Nick Matzke
Hi, I've written a function which I load with a source command. The function requires a certain library, phangorn, to work. I would like the function to check if phangorn is loaded as a library before running. For some reason, just putting require(phangorn) into the sourced function doesn'

[R] Simple Boxplot Question- unexpected string constant error

2011-01-31 Thread MarquisDM
Hi everyone, Sorry for the newbie question but whenever I enter the following code into r it gives me an unexpected string constant in "boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)'" error. I have tried everything to eliminate it and have searched these forums to no avail, can anyone tell

Re: [R] Latent Class Logit Models in discrete choice experiments

2011-01-31 Thread Sebastián Daza
See: https://www.msu.edu/~chunghw/downloads.html Maybe you can find something useful there! Regards On 1/31/2011 12:35 PM, Daniel Vecchiato wrote: Dear R users, I would like to perform Latent Class Logit Models for the analysis of choice experiments in environmental valuation. This kind of a

[R] List of List in Data Frame

2011-01-31 Thread Gundala Viswanath
Dear sirs, I have a data that is generated like this: > dat1 <- data.frame(V1 = rep(1, 5), V2 = sample(c(40:45), 5)) > dat2 <- data.frame(V1 = sample(c(0,1), 5, replace = TRUE), V2 = > sample(c(40:45), 5, replace = TRUE)) What I want to do is to obtain a data frame that contain list of list. >

Re: [R] Regularization of a matrix that has some tiny negative eigenvalues

2011-01-31 Thread Dimitri Liakhovitski
Thanks a lot, Kjetil! On Mon, Jan 31, 2011 at 1:15 PM, Kjetil Halvorsen wrote: > The Matrix package (which should already be insatlled on your > computer, since it is "Recommended") have the function > nearPD, which should do the job. > > Kjetil > > On Sat, Jan 29, 2011 at 1:32 AM, Dimitri Liakho

Re: [R] Unable to require installed package

2011-01-31 Thread 刘力平
Hi, I uploaded my package to http://win-builder.r-project.org/ and had it built. It can work on one machine, but on the other, it reports: Loading required package: grt Error: package 'grt' was built for i386-pc-mingw32 In addition: Warning message: package 'grt' was built under R version 2.12.1

[R] list.files() error message: 'translateCharUTF8' must be called on a CHARSXP

2011-01-31 Thread MacQueen, Don
I'm using list.files() on my home directory, like this: crnt.files <- list.files(dir.to.check, full.names=TRUE, all.files=TRUE, recursive=TRUE) With dir.to.check set to the full path to my home directory. After a while I get: Error in list.files(dir.to.check, full.names = TRUE, all.files = T

[R] How many nested function calls?

2011-01-31 Thread muchado22
Is there a limit to how many nested function calls R will tolerate? I mean, if I have a function that calls another function that calls another function, etc., is there a limit to how deep I can go? I am getting an error that says a variable is not available. When I do a traceback(), it shows that

Re: [R] Storing loop output in matrix

2011-01-31 Thread Peter Ehlers
On 2011-01-31 13:49, Dean Castillo wrote: Hello I am trying to store output from a loop into an empty matrix. The current code I am using is: M<-mat.or.vec(11,89) for (j in list(3,91)) + {M[,(j-2)]<-pic(datain[,j], mytree)} datain is a matrix (11,91). I only want to use the pic() function on t

Re: [R] Storing loop output in matrix

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 4:49 PM, Dean Castillo wrote: Hello I am trying to store output from a loop into an empty matrix. The current code I am using is: M<-mat.or.vec(11,89) R code to create a matix would use the matrix function, for (j in list(3,91)) + {M[,(j-2)]<-pic(datain[,j], mytree)}

[R] arranging pie charts in a matrix layout with row/col labels

2011-01-31 Thread Rajarshi Guha
Hi, I have a vector of data, that I group based on two factors via tapply. For each such grouping I would like to plot a pie chart. I can layout these pie charts in a matrix layout, correpsonding to the levels of the two factors. But I am getting stuck on how to label the rows and colums. My curre

Re: [R] identify subsets based on two grouping factors

2011-01-31 Thread Rajarshi Guha
Indeed, tapply is what I needed. To clarify Phils' question, what I needed was tapply(x, list(cut.grp1, cut.grp2), function(z) table(z)) On Mon, Jan 31, 2011 at 4:50 PM, Bert Gunter wrote: > ?tapply   is the basic R function for this. There are many other packages > (e.g. plyr) and functions (e.

Re: [R] p value for joint probability

2011-01-31 Thread Peter Ehlers
On 2011-01-31 12:42, moleps wrote: Dear all, Given rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) How can I add a column (rr$p) for the joint probability of each r1& r2 pair? If you take the values in each pair to be observations from two independent Normal distributions, it's

[R] Storing loop output in matrix

2011-01-31 Thread Dean Castillo
Hello I am trying to store output from a loop into an empty matrix. The current code I am using is: > M<-mat.or.vec(11,89) > for (j in list(3,91)) + {M[,(j-2)]<-pic(datain[,j], mytree)} datain is a matrix (11,91). I only want to use the pic() function on the columns 3:91. When I use this code outp

[R] silhouette fuzzy

2011-01-31 Thread pete
After ordering the table of membership degrees , i must get the difference between the first and second coloumns , between the first and second largest membership degree of object i. This for K=2,K=3,to K.max=6. This difference is multiplyed by the Crisp silhouette index vector (si). Too it de

[R] Problem with intersection between two different tables

2011-01-31 Thread Shishir Vor
Hi, I'm a beginner with R. I have two different  tables with the variable name dmr1 and tp2 a given following. v1 is the common  column  field of the both tables. In the first table column v3 is always v2+1 while in the second table v2 and v3 hold the range. I want to know which rows of tb1 in

Re: [R] how to search to value to another table

2011-01-31 Thread Petr Savicky
On Mon, Jan 31, 2011 at 05:35:35PM +0100, Mauluda Akhtar wrote: > Hello, > > I'm a new R user. > > I have two different dummy tables with the variable name tb1 and tb2. Hello. First, let me put your data into an R command using dput(). tb1 <- structure(list(V1 = structure(c(1L, 1L, 1L, 1L,

[R] How to compute Precicion and Recall with cox model

2011-01-31 Thread Abdou Maiga
Hi, I doing some analysis and truying to use Survival analysis (Survival Package) to show the relation between some metrics and the presence of an event A in a classe. I build a Cox model with Coxph. My problem is with the function predict. Because i would like to know the accuracy of the model (by

[R] Generic Functions and Dates

2011-01-31 Thread Elliot Joel Bernstein
I'm trying to write a generic function that calls different methods depending on the structure of the argument, but not the exact type of its contents. For example, the function 'nan2last' below works for a numeric vector but not for a vector of Date objects. Is there any way to make it work on

Re: [R] Select rows with distinct values in a column and other conditions

2011-01-31 Thread Ista Zahn
Hi Sarah, Here is how I would do it. Not elegent, but fairly transparent, and it seems to give the desired result. DF <- as.data.frame(DF) pick.value <- function(x){ if(0 %in% x$PA1) { x <- x[x$PA1 == 0,] } x <- x[x$Area == max(x$Area, na.rm=T),] S <- x[sample(1:nrow(x),

Re: [R] identify subsets based on two grouping factors

2011-01-31 Thread Phil Spector
Rajarshi - It's not clear to me what you mean by "the distribution of levels obs.". Does as.data.frame(table(x$obs,cut.grp1,cut.grp2)) give you something like what you want? - Phil Spector Statistical Computi

[R] identify subsets based on two grouping factors

2011-01-31 Thread Rajarshi Guha
Hi, I have a data.frame that has a categorical variable, for which I would like to look at the distribution of levels of this variable, based on a grouping of two other variables. As an example: x <- data.frame(obs=sample(c('low', 'high'),100, replace=TRUE), grp1=sample(1:10, 100, replace=TRUE),

Re: [R] Latent Class Logit Models in discrete choice experiments

2011-01-31 Thread Ingmar Visser
Daniel, searching for 'latent class analysis' on http://www.r-project.org/search.html gives many results: the CRAN taskviews on psychometrics and the one on clustering both contain relevant links to packages that may do what you are looking for. In particular, for general LCA there is package e107

Re: [R] HLM Model

2011-01-31 Thread Belle
Hi Silvano: Could you tell me what "correlation=corSymm(form = ~ 1 |id)" represents? In our case, team is random effect, trt, pairs, grade, school are fixed effect, and each team is within school. I still got the different results from both SAS and R. > unstruct <- gls(score~trt+pairs+grade+s

[R] Applying previously fitted fGarch model

2011-01-31 Thread shlagbaum
Greetings, Suppose I fit an fGarch model via garchFit function for a time series X. I'm wondering is there any easy way to apply the fitted model to a different time series Y to calculate conditional variances and standardized residuals? Thanks. -- View this message in context: http://r.789695

[R] barplot with varaible-width bars

2011-01-31 Thread Gould, A. Lawrence
Bill Pikounis provided a clever and elegant solution: in the program barplot.default, replace the statement width <- rep(width, NR) that occours around line 51 ( NR = nrow(height) ) with the statement width <- width. I renamed the program barplotX.fn and attached it to this ema

Re: [R] R, Cygwin, & Vi

2011-01-31 Thread S
Thanks very much Professor Ripley. I was running R 2.10 under XP. As part of troubleshooting I uninstalled and installed 2.11. I also updated cygwin. This is a system-specific problem, editing still works on my home laptop. I am running CRAN build of R. Yes I did mean Vim. I believe it is a s

[R] p value for joint probability

2011-01-31 Thread moleps
Dear all, Given rr<-data.frame(r1<-rnorm(1000,10,5),r2<-rnorm(1000,220,5)) How can I add a column (rr$p) for the joint probability of each r1 & r2 pair? I know how to add the column.. I just dont know how to compute the p value for joint probabilities given the two samples. //M __

Re: [R] computing var-covar matrix with much missing data

2011-01-31 Thread Kevin Wright
One option is the nearPD function in the Matrix package. Other options include robust estimation of the covariance matrix. You should Google this. It's been discussed before. Kevin Wright On Mon, Jan 31, 2011 at 11:30 AM, Mike Miller > wrote: > Is there an R function for computing a varianc

[R] [R} R install on Unix Server

2011-01-31 Thread Joseph Magagnoli
Hi all, I am hoping to get R installed configured at work, on an HP-Unix server. R was installed but was not configured correctly because we do not have a Fortran compiler for HP unix. The IT guys sent me an email with some questions that I hope to get some help in anwsering. " We need the inform

[R] binning data from NMR

2011-01-31 Thread Marcelo Lima
Hey there, I have a matrix which is from NMR data (first column represents the ppm values and the subsequent their respective intensities for my various samples) that I would like to bin. Make every 10 points ( on my x axis) become one by averaging them out. Any suggestions? Thanks! -- Marcelo A

Re: [R] From data frame to list object

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 2:26 PM, David Winsemius wrote: On Jan 31, 2011, at 2:18 PM, Bogaso Christofer wrote: Sorry if I did not clarify that. Here I have a data frame with many columns, which was taken from some outside DB. Now I want to split that data frame and create a "list" object (to m

Re: [R] From data frame to list object

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 2:18 PM, Bogaso Christofer wrote: Sorry if I did not clarify that. Here I have a data frame with many columns, which was taken from some outside DB. Now I want to split that data frame and create a "list" object (to make my further calculation easier), on basis of a typ

Re: [R] Comparing lengths of different vectors simultaneously

2011-01-31 Thread Henrique Dallazuanna
Try this: length(unique(sapply(list(rnorm(4), rnorm(5), rnorm(6)), length))) == 1 On Mon, Jan 31, 2011 at 5:14 PM, Megh Dal wrote: > I am looking for an elegant way how I can test the equality of lengths of > multiple vectors. > > For example, this is working fine: > > > length(rnorm(4)) == len

[R] Comparing lengths of different vectors simultaneously

2011-01-31 Thread Megh Dal
I am looking for an elegant way how I can test the equality of lengths of multiple vectors. For example, this is working fine: > length(rnorm(4)) == length(rnorm(5)) [1] FALSE However this is not: > length(rnorm(4)) == length(rnorm(5)) == length(rnorm(6)) Error: unexpected '==' in "length(rnorm(

Re: [R] Missing at random

2011-01-31 Thread Bert Gunter
Ted et.That solution is for (in "missing data language") MCAR (Missing Completely At Random), i.e. the probability of being missing does not depend on any of the variables in the data. For MAR (Missing At Random), the probability of being missing may depend on the values of covariates but must not

Re: [R] Finding a Diff within a Dataframe columns

2011-01-31 Thread jim holtman
I see that others have already responded, but will add my point of view. You indicated that you wanted to take the difference between pairs of columns and did not specify exactly how many there were; in your example there were 4 columns (2 pairs). If there were only two, then the solution from De

Re: [R] From data frame to list object

2011-01-31 Thread Bogaso Christofer
Sorry if I did not clarify that. Here I have a data frame with many columns, which was taken from some outside DB. Now I want to split that data frame and create a "list" object (to make my further calculation easier), on basis of a typical column of that DB. I cannot post my original DB here (due

[R] Latent Class Logit Models in discrete choice experiments

2011-01-31 Thread Daniel Vecchiato
Dear R users, I would like to perform Latent Class Logit Models for the analysis of choice experiments in environmental valuation. This kind of analysis is usually performed with NLogit Software (http://www.limdep.com). I attach the results I usually obtain using NLogit and NLogit model speci

[R] Function rearrange (quantreg)

2011-01-31 Thread Mauro Sayar Ferreira
Dear all How can I obtain the data from the function "rearrange" in package quantreg More especifically, based on the example below (available in the help of the rearrange function), how can I access the data generated by "rearrange(zp)" ? data(engel) z <- rq(foodexp ~ income, ta

[R] Forest Plot Text

2011-01-31 Thread Ross, Stephanie
Hello All, I am having a problem creating text for my forest plot using the "forestplot" function in the rmeta package. I think my problem is that I have too many columns of text, so I was wondering if there is a way to shrink my text or to change the default setting. Here is an example:

[R] Select rows with distinct values in a column and other conditions

2011-01-31 Thread sarah bauduin
My dataframe looks like this one: SightingID<-c(2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013)PA1<-c(0,1,0,0,1,1,1,1,0,0,-99,1,1)PA2<-c(1,NA,1,1,NA,-99,-99,NA,1,1,1,NA,NA)PlotID<-c(1,1,2,2,2,3,3,3,4,4,4,4,5)Area<-c(0.2,0.3,0.25,0.2,0.3,0.4,0.3,0.35,0.4,0.4,0.5,0.3,0.2)DF<-cbind(

Re: [R] From data frame to list object

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 1:56 PM, Bogaso Christofer wrote: Thanks David for this reply. However if my data frame has only 2 columns then it is working fine. It is not working for a general setting: dfrm <- data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6), z=rep(c("x", "y", "z"), each=2)) t

Re: [R] From data frame to list object

2011-01-31 Thread Bogaso Christofer
Thanks David for this reply. However if my data frame has only 2 columns then it is working fine. It is not working for a general setting: dfrm <- data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6), z=rep(c("x", "y", "z"), each=2)) tapply(dfrm[,1], dfrm$y, c) # this is working fine > tapply(

Re: [R] Regularization of a matrix that has some tiny negative eigenvalues

2011-01-31 Thread Kjetil Halvorsen
The Matrix package (which should already be insatlled on your computer, since it is "Recommended") have the function nearPD, which should do the job. Kjetil On Sat, Jan 29, 2011 at 1:32 AM, Dimitri Liakhovitski wrote: > Dear all: > > In what I am doing I sometimes get a (Hessian) matrix that has

[R] how should I deal with features with variable based on time in Bayesian Network?

2011-01-31 Thread ying zhang
Hi All, I would like to apply Bayesian network on some data. However, some of the features are based on time. E.g. Number of time he/she visit library. As it can be Total number of this person visits, Average weekly number of visit, Daily number of visits, or even Number of visits in th

Re: [R] From data frame to list object

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 1:03 PM, Bogaso Christofer wrote: Dear all, let say I have following data frame: > dfrm <- data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6)) > tapply(dfrm$x, dfrm$y, c) $a [1] 0.9711995 1.4018345 -1.4355713 -0.5106138 -0.8470171 [6] 1.1634586 $b [1] -0.8058164

Re: [R] computing var-covar matrix with much missing data

2011-01-31 Thread Peter Langfelder
On Mon, Jan 31, 2011 at 9:30 AM, Mike Miller wrote: > Is there an R function for computing a variance-covariance matrix that > guarantees that it will have no negative eigenvalues?  In my case, there is > a *lot* of missing data, especially for a subset of variables.  I think my > tactic will be t

[R] From data frame to list object

2011-01-31 Thread Bogaso Christofer
Dear all, let say I have following data frame: > data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6)) x y 1 -1.072152537 a 2 0.382985265 a 3 0.058877377 a 4 -0.006911939 a 5 -2.355269051 a 6 -0.303095553 a 7 0.484038422 b 8 0.733928931 b 9 -1.136014346 b

[R] computing var-covar matrix with much missing data

2011-01-31 Thread Mike Miller
Is there an R function for computing a variance-covariance matrix that guarantees that it will have no negative eigenvalues? In my case, there is a *lot* of missing data, especially for a subset of variables. I think my tactic will be to compute cor(x, use="pairwise.complete.obs") and then pr

[R] rgl: draw multiple ellipsoids

2011-01-31 Thread baptiste auguie
Dear list, I'm trying to visualise some ellipsoidal shapes in 3D. Their position, axes, and angular orientation can be arbitrary. I saw an ellipse3d function in rgl; however it is heavily oriented towards the statistical concept of ellipse of confidence, whilst I am just concerned with the geometr

Re: [R] Meaning of pterms in survreg object?

2011-01-31 Thread Martin Maechler
> "JH" == Johannes Huesing > on Fri, 28 Jan 2011 06:37:31 +0100 writes: JH> David Winsemius [Thu, Jan 27, 2011 at 10:08:00PM CET]: >> You got a perfectly sensible reply from Thereau, the author of the >> package, a day after your posting and then failed to respond to h

Re: [R] test statistic in anova.glm when quasi family is used

2011-01-31 Thread Ben Bolker
Eiiti Kasuya kyushu-u.org> writes: > > When quasi family (not quasipoisson or quasibinomial) is used in glm, > what is the appropriate test statistic in anova.glm? > Help of anova.glm tells “For models with known dispersion (e.g., > binomial and Poisson fits) the chi-squared test is most appropr

[R] how to search to value to another table

2011-01-31 Thread Mauluda Akhtar
Hello, I'm a new R user. I have two different dummy tables with the variable name tb1 and tb2. tb1< v1v2 v3 v4 "chr1" 2223 3 "chr1" 3637 1 "chr1" 5455 0 "chr1" 7778 1 "chr2" 8081 4 "chr2" 8586 0 "chr2" 99 1

[R] Error using write.xlsx message <20110128124648.284...@gmx.net>

2011-01-31 Thread Pedro Lopez
Here are the specifications from Excel 2010. There are others for older versions of Excel so you may need to do a search specific to your application. http://office.microsoft.com/en-us/excel-help/excel-specifications-and-limits-HP010342495.aspx?CTT=5&origin=HP005199291 You should be OK looking

Re: [R] Select rows with distinct values in a column and other conditions

2011-01-31 Thread Joshua Wiley
Dear Sarah, What you will need is a series of logical conditions. ?Logic or ?"|" should pull up the documentation on the logical operators available to use. Because this list does not accept HTML emails (see the posting guide), your data frame did not come through in any coherent form. Can you

Re: [R] R, Cygwin, & Vi

2011-01-31 Thread Prof Brian Ripley
We need to know much more (see the posting guide) - What version of R? Did you update recently? - Are you running a Windows build of R, or did you compile your own from the sources as a Cygwin build? On Mon, 31 Jan 2011, beehatch wrote: Hi all, I've been a happy user of R under cygwin for

Re: [R] Finding a Diff within a Dataframe columns

2011-01-31 Thread Ramya
Thanks. It helped me a lot. Ramya On Mon, Jan 31, 2011 at 6:56 AM, djmuseR [via R] < ml-node+3248651-1296211736-40...@n4.nabble.com > wrote: > Hi: > > I won't speak for Jim, as he's more than capable of responding to this > himself, but I'll give it a shot: > > (1) It's not just the 'double per

[R] Select rows with distinct values in a column and other conditions

2011-01-31 Thread sarah bauduin
My data frame looks like: SightingID PA1 PA2 PlotID InOverlap Area12001 1 -99392 Y0.222002 1 -99388 Y0.2532008 1 NA104 N0.3442010 1 NA 71 N 0.1852012 1 NA 6

[R] withdraw my email from list

2011-01-31 Thread Fernanda Melo Carneiro
Please I would like that my email address be withdrawn from contact list.Sincerely yours  Fernanda Melo Carneiro contato: (62) 3521-1480 e 8121-7374www.ecoevol.ufg.br Laboratório de Ecologia Teórica e Síntese (UFG)   [[alternative HTML version deleted]] _

Re: [R] Help in getting info from a DataFrame

2011-01-31 Thread ADias
Petr Pikal wrote: > > Hi > > r-help-boun...@r-project.org napsal dne 31.01.2011 09:44:00: > >> >> >> David Winsemius wrote: >> > >> > >> > On Jan 30, 2011, at 5:27 PM, ADias wrote: >> > >> >> dados<- >> >> data >> >> .frame >> >> (Store >> >> = >> >> c >> >> ("Setubal >> >> ","lx

[R] SOLVED: specific fourier call

2011-01-31 Thread Jari Soininen
Hi David, Thanks for reply. It really was the fda library. Best Wishes, Jari Lainaus Jari Soininen : Hi all, This is very embarrassment, but I have used some years ago this type of function call: " Arima(trend + max(seasonal), order=c(2,0,1), xreg=fourier(1:n,c*2,m))" Unfortunately,

Re: [R] Rubin's rules of multiple imputation

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 10:46 AM, huang min wrote: It seems Prof. Lumley has moved to Auckland. But his webpage also says: "He is still an Affiliate Professor at the University of Washington." On Mon, Jan 31, 2011 at 11:33 PM, John Fox wrote: Dear Joe, Take a look at the mitools package

Re: [R] Rubin's rules of multiple imputation

2011-01-31 Thread huang min
It seems Prof. Lumley has moved to Auckland. On Mon, Jan 31, 2011 at 11:33 PM, John Fox wrote: > Dear Joe, > > Take a look at the mitools package, written by Thomas Lumley, who's a > faculty member at your university. > > Best, > John > > > John Fox > Senator Wi

Re: [R] Rubin's rules of multiple imputation

2011-01-31 Thread John Fox
Dear Joe, Take a look at the mitools package, written by Thomas Lumley, who's a faculty member at your university. Best, John John Fox Senator William McMaster Professor of Social Statistics Department of Sociology McMaster University Hamilton, Ontario, Canada

[R] Changing significant codes in mtable {memisc}

2011-01-31 Thread Erich Striessnig (IIASA)
Dear R-users! I've been trying to produce tables from glm-results using mtable from the memsic package but I'm not quite happy with the default of signif.codes in R. What I want to do is to change this line: Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 to that line: Signif. co

[R] httpd-access.log parsing and graph construction.

2011-01-31 Thread Jeff Hamann
R gurus: I'm thinking about using R for website traffic analysis but didn't find anything in my web searches specific to R. If I have the webpages (simple example would contain something like three (3) static pages with a couple of links each) and parse the apache access log file (httpd-acce

Re: [R] Meaning of pterms in survreg object?

2011-01-31 Thread Terry Therneau
> survmod <- survreg(Surv(sapply(bleedtimes, min, 10), bleedtimes < 10) > ~ device + frailty.gaussian(pat)) > residuals(survmod) > Error in residuals.survreg.penal(survmod) : > Residuals not available for sparse models Thanks for the reproducable error. a. With respect to your earli

Re: [R] How to Create Nested Data Frame

2011-01-31 Thread Ivan Calandra
You're right, it's not exactly what you wanted. But... data.frames are lists, so you would access each element of it as you intended to: HIV$hiv.dat1$predictions My opinion is that it's easier to work with data.frames when possible (as opposed to lists), and I don't see why you would break do

Re: [R] How to Create Nested Data Frame

2011-01-31 Thread Gundala Viswanath
Hi Ivan, Thanks for the reply. > Would that do? But I won't do. > names(dat1) <- names(dat2) <- c("labels","predictions") > HIV <- list(hiv.dat1=dat1, hiv.dat2=dat2) The above snippet produces this instead: > names(dat1) <- names(dat2) <- c("labels","predictions") > HIV <- list(hiv.dat1=dat1

Re: [R] R-/Text-editor for Windows?

2011-01-31 Thread Jonathan P Daily
Well, AutoHotKey [1] is a free program/scripting language that runs scripts to perform basic window handling, file I/O, and program execution. It also allows you to bind the running of these scripts to keys or mouse-strokes with the option of making each window-specific. NppToR is actually a co

[R] test statistic in anova.glm when quasi family is used

2011-01-31 Thread Eiiti Kasuya
When quasi family (not quasipoisson or quasibinomial) is used in glm, what is the appropriate test statistic in anova.glm? Help of anova.glm tells “For models with known dispersion (e.g., binomial and Poisson fits) the chi-squared test is most appropriate, and for those with dispersion estimated by

Re: [R] leap year and order function

2011-01-31 Thread Toby Marthews
Dear All, I've always used this code: year=c(1948:1953,2000,2100,2200,2300) numdays=ifelse((year%%4==0 & year%%100!=0) | year%%400==0,366,365) > numdays [1] 366 365 365 365 366 365 366 365 365 365 Toby From: r-help-boun...@r-project.org [r-help-boun...

Re: [R] Can i make an histogramm with bars on the Y-axis ?

2011-01-31 Thread ibliss
Thank you ! -- View this message in context: http://r.789695.n4.nabble.com/Can-i-make-an-histogramm-with-bars-on-the-Y-axis-tp3248321p3248628.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://

[R] Wavethresh - Scaling - Wavelet

2011-01-31 Thread rizesimoes
Hi users, When I use the scaling = by.level, appear in the R, values of the scales by level, but I'm viewing the levels 10, 11, 12, 13 and 14. I do like to have a global scale, using the value of Level 14 ". I would like to see everyone on the same scale level of 14. If I leave th

[R] Reading file names containing Metacharacters

2011-01-31 Thread Jeisson F
I am trying to read some file names from an specific directory and such names contains metacharacters. The file names is like V4.35_T01-400720.csv In total I have 14 files for which the value T01 goes up to T14. I need to read the files into a string vector that looks like >names"V4.35_T01-4007

[R] specific fourier call

2011-01-31 Thread Jari Soininen
Hi all, This is very embarrassment, but I have used some years ago this type of function call: " Arima(trend + max(seasonal), order=c(2,0,1), xreg=fourier(1:n,c*2,m))" Unfortunately, now I'm not able to find the suitable library where this specific fourier-call is implemented. Can you hel

Re: [R] R version

2011-01-31 Thread Jari Soininen
Hello Alaios, I would like to figure out the command "version" inside of R: version _ platform x86_64-pc-mingw32 arch x86_64 os mingw32 system x86_64, mingw32 status major 2 minor 11.1 year 2010 month 05 d

[R] R, Cygwin, & Vi

2011-01-31 Thread beehatch
Hi all, I've been a happy user of R under cygwin for a number of years now. I prefer the bash interface and readline history, and I find Vi to be the most efficient editor. Recently, the edit command has started giving me errors: > edit(file='foo.R') Error in edit(name, file, title, editor) : u

[R] Problem with loading the Snowball package

2011-01-31 Thread vioravis
I tried using the "Snowball" package for performing stemming in text mining. But when I tried to load the package the following error is thrown: Error : .onLoad failed in loadNamespace() for 'Snowball', details: call: NULL error: .onLoad failed in loadNamespace() for 'rJava', details: call:

Re: [R] 3D Binning

2011-01-31 Thread vioravis
This worked fine. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/3D-Binning-tp3236223p3248489.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] List of all times zones in R

2011-01-31 Thread David Winsemius
On Jan 31, 2011, at 1:07 AM, Maithula Chandrashekhar wrote: Hi all, in R I have Sys.timezone() function to get the current working Time zone. Only on some systems. However I want to have a vector to get the list of all available time zones, like say, LETTERS gives me all letters. Is there a

  1   2   >