Re: [R] R 2.12.0 for Windows: error when loading (some) packages

2010-10-17 Thread Renaud Lancelot
Thank you. I have read the CHANGES file as well as the FAQ, indeed. I have uninstalled R, removed the remaining directories and reinstalled the new version. I have also run update.packages(checkBuilt=TRUE, ask=FALSE) Everything works fine except for the recommended package lattice: > library(lat

Re: [R] R 2.12.0 for Windows: error when loading (some) packages

2010-10-17 Thread Prof Brian Ripley
This is the very first item in the CHANGES file for 2.12.0 How to upgrade your R is an FAQ, http://cran.r-project.org/bin/windows/base/rw-FAQ.html#What_0027s-the-best-way-to-upgrade_003f On Mon, 18 Oct 2010, Renaud Lancelot wrote: Dear all, I have installed the latest version of R 2.1

Re: [R] rgdal package (Matteo Toro)

2010-10-17 Thread Prof Brian Ripley
The current version of rgdal on CRAN is 0.6-28, not 0.3-5! The latter was never in CRAN, but 0.3-7 dates from 2006. Is your R version (unstated, see the posting guide) also from 2006? On Sun, 17 Oct 2010, ciccp...@libero.it wrote: Hi everybody, I'm trying to install the "rgdal" package in R

Re: [R] ncdf installation in R

2010-10-17 Thread lev_lafayette
Sashi Challa wrote: > > I am trying to install ncdf package on a Linux 64-bit machine. > > I successfully installed netcdf using this command, > > ./configure --prefix=/home/challar/netcdf/ --disable-netcdf4 > Hi Sashi, Just had a similar issue today. I would suggest the --disable-netcdf4 h

[R] Error: subscript out of bounds

2010-10-17 Thread IRD
Dear All I have problem with this: > IWJR.temp <-IWJR.missing[sample(1:length(IWJR.missing),1),] Error: subscript out of bounds How I can solved this. Thanks IRD __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

[R] R 2.12.0 for Windows: error when loading (some) packages

2010-10-17 Thread Renaud Lancelot
Dear all, I have installed the latest version of R 2.12.0 available on CRAN (http://cran.r-project.org). When I try to load the recommended package lattice: > library(lattice) Error: package 'lattice' is not installed for 'arch=i386' I am running Rgui using C:\R\R-2.12.0\bin\i386\Rgui.exe --vani

[R] Incorrect positioning of raster images on Windows

2010-10-17 Thread Sharpie
I am working on dumping raster data from R into PNG files using rasterImage(). I am working with a test matrix from the rasterImage() example and using it to produce a PNG image with the following code: # From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard. testImage <- as

Re: [R] How to install R on Linux via source compilation?

2010-10-17 Thread John
On Sunday, October 17, 2010 10:27:48 am noclue_ wrote: > How to install R on Linux via source compilation? > Has anybody done it? > I could not find step by step instructions online. > > I would appreciate if you could share your experience. > If you are new to linux, I would strongly recommend

Re: [R] dpois().......bizarre warning messages

2010-10-17 Thread Dennis Murphy
Hi: On Sun, Oct 17, 2010 at 8:46 AM, Federico Bonofiglio wrote: > Dear Masters, > > I have a question to submit > > > consider the following script > > m<-4.95 > obs<-rpois(36,m) # i generate 36 realization from a poisson(m) > > hist(obs,freq=F) > curve(dpois(x,m),add=T,col="red") #i wish to ove

Re: [R] Data contamination

2010-10-17 Thread Wu Gong
Hi, You are right, runif(5,1,50) could generate a same value twice. And I think that your code runs runif(5,1,50) twice too. Try ?sample selected <- sample(1:50,3) data.sim[selected,1] <- data.sim[selected,1] + rnorm(5, mean=20, sd=1) Hope it helps. - A R learner. -- View this message in

Re: [R] paste an unevaluated expression

2010-10-17 Thread Gabor Grothendieck
On Sun, Oct 17, 2010 at 9:14 PM, Lorenzo Cattarino wrote: > Hi R-users, > > > > I would like to create an expression without evaluating it. Then paste > that expression to an object. Example: > > > > Result <- paste('Result', 1, sep="") > > paste(Result, substitute(apply(exp.des[1:10,], 1, one.row

[R] paste an unevaluated expression

2010-10-17 Thread Lorenzo Cattarino
Hi R-users, I would like to create an expression without evaluating it. Then paste that expression to an object. Example: Result <- paste('Result', 1, sep="") paste(Result, substitute(apply(exp.des[1:10,], 1, one.row, parms=parameters)), sep="<-") However this pastes EACH element of th

Re: [R] Basic structure operations doubt

2010-10-17 Thread Santosh Srinivas
Thanks Josh. At your convenience, Any pointers on why this was designed like this? i.e. shouldn’t droplevels() be the default behavior? I'm missing something in understanding on how these operations (manipulations) were designed to work. -Original Message- From: Joshua Wiley [mailto:

[R] Data contamination

2010-10-17 Thread mazlina Abu Bakar
Dear experts, Helps are badly needed. I'm trying to generate a panel data with error term from N(0,1) and alpha from U(0,20).Explanatory variables are from multivariate std normal distn. Problem arised when I tried to contaminate the data in Y by adding additional term from N(50,1). I ask the com

[R] nonparaeff package, fdh() function

2010-10-17 Thread John P. Burkett
The nonparaeff package's function fdh(), when used with an output-orientation, produces an efficiency score that puzzles me. I am using nonparaeff in R version 2.8.1 running under Linux. In this context, I ran the following code: library(nonparaeff) input= c(6, 10, 16, 14, 15) output=c(8, 20,

Re: [R] Basic structure operations doubt

2010-10-17 Thread Joshua Wiley
Hi, The easiest way to get rid of the empty levels is with droplevels(). See ?droplevels for details. It actually has a method for data frames even. So you could just do something like: Indx_Constituents <- droplevels(Indx_Constituents) or whatever your data frame was called and it will drop a

Re: [R] Class mode text isopen can read can write - too many open connections

2010-10-17 Thread Santosh Srinivas
I'm basically doing using code: NOTE THIS IS A RECURSIVE DOWNLOAD ... SO CHANGE TO A DIRECTORY THAT YOU WANT TO JUNK ... After the download ... try deleting the data without closing R and it says the file is currently held "open" by R ... Not sure how I can close that connection .. Please

[R] Basic structure operations doubt

2010-10-17 Thread Santosh Srinivas
I'm doing these manipulations on the data frame and wondering why does R have to remember historical data on my operation and not just keep the needed info. Probably a basic fundamentals of the way R handles data .. Pls point me to the manual if possible .. I have this Index data: > head(NIFTY_IND

Re: [R] Getting tripped up on NAs in trying to create new variable

2010-10-17 Thread Gabor Grothendieck
On Sun, Oct 17, 2010 at 9:03 PM, Greg Blevins wrote: > Hello R help: > > I have the following data: > > a <- c(NA, 2, 2, 3, 2, NA) > b <- c(NA, NA, 3, NA, 1, 3) > df <- data.frame(a, b) >> df >   a  b > 1 NA NA > 2  2 NA > 3  2  3 > 4  3 NA > 5  2  1 > 6  NA 3 > > I want to create variable c such

Re: [R] Getting tripped up on NAs in trying to create new variable

2010-10-17 Thread Peter Alspach
Tena koe Greg df$c <- 0 df[apply(df[,-3], 1, function(x) any(x %in% 3)), 3] <- 1 df[apply(df[,-3], 1, function(x) all(is.na(x))), 3] <- NA df a b c 1 NA NA NA 2 2 NA 0 3 2 3 1 4 3 NA 1 5 2 1 0 6 NA 3 1 HTH Peter Alspach > -Original Message- > From: r-help-boun...@r

Re: [R] delete data row

2010-10-17 Thread Joshua Wiley
I used the -which() construct initially to try to show "deleting" cases. I believe it hung around longer than it should have. That said, I have also had David's experience with NAs. What about a vectorized version of identical(TRUE, x)? This avoids the which() problem Bill pointed out, and the

[R] Getting tripped up on NAs in trying to create new variable

2010-10-17 Thread Greg Blevins
Hello R help: I have the following data: a <- c(NA, 2, 2, 3, 2, NA) b <- c(NA, NA, 3, NA, 1, 3) df <- data.frame(a, b) > df a b 1 NA NA 2 2 NA 3 2 3 4 3 NA 5 2 1 6 NA 3 I want to create variable c such that if there is a 3 in either variable a or variable b, variable c is 1(rows 3, 4

[R] trouble installing R-patched (R-2.12.0) when TMPDIR is specified

2010-10-17 Thread Andrew Yee
I noticed that if I specify the location of TMPDIR in .bashrc as follows on a Linux 64 bit system: export TMPDIR=/store/home/ayee/.tmp I get the following error message when installing R make[3]: Entering directory `/home/ayee/R-patched/src/library/base' building package 'base' make[4]: Entering

Re: [R] delete data row

2010-10-17 Thread David Winsemius
On Oct 17, 2010, at 3:56 PM, William Dunlap wrote: I had been thinking of: x <- c(1, (2^(0.5))^2 , 3, 5, (2^(0.5))^2 , 3, 1) y <- 2 x[-which(zapsmall(x-y) == 0)] [1] 1 3 5 3 1 Using which() to convert logicals into integer subscripts is almost always unnecessary and often wrong. At one

[R] rgdal package (Matteo Toro)

2010-10-17 Thread ciccp...@libero.it
>Hi everybody, > >I'm trying to install the "rgdal" package in R, but it seems not possible... > >i'm typing > >> install.packages("rgdal") >Warning in install.packages("rgdal") : > argument 'lib' is missing: using '/home/toro/R/i486-pc-linux-gnu-library/2. >9' >--- Please select a CRAN mirror for

Re: [R] delete data row

2010-10-17 Thread William Dunlap
> I had been thinking of: > > x <- c(1, (2^(0.5))^2 , 3, 5, (2^(0.5))^2 , 3, 1) > > y <- 2 > > x[-which(zapsmall(x-y) == 0)] > [1] 1 3 5 3 1 Using which() to convert logicals into integer subscripts is almost always unnecessary and often wrong. In this case it fails when no x is close to y, be

Re: [R] How to fix error in the package 'rgenoud'

2010-10-17 Thread Wonsang You
I could solve this problem by setting the boundary options as follows. par1Bnd<-c(0.001,0.999) par2Bnd<-c(-10,10) DomainMat<-matrix(c(par1Bnd,par2Bnd), nrow = 2, ncol=2, byrow=TRUE) result<-genoud(Qmin, nvars=2, starting.values=c(0.5,0), Domains=DomainMat, control=list(ndeps=c(1e-7,1e-2)), boundar

Re: [R] how to convert string to object?

2010-10-17 Thread Joshua Wiley
Hi, Wu Gong and Jim Holtman gave you options that should work, but I suspect there is a way to circumvent the entire issue if we knew more about your context and goals. Of course pasting together calls and then evaluating them is always an option, but there may be a simpler way. This is all summ

Re: [R] how to convert string to object?

2010-10-17 Thread jim holtman
Have you tried this: > temp = "~aparch(" > temp1 = paste(temp,1, sep = "") > temp2 = paste(temp1,1, sep = ",") > temp3 = paste(temp2, ")",sep = "") > temp3 [1] "~aparch(1,1)" > as.formula(temp3) ~aparch(1, 1) > x <- as.formula(temp3) > str(x) Class 'formula' length 2 ~aparch(1, 1) ..- attr(*, ".

Re: [R] how to convert string to object?

2010-10-17 Thread lord12
how do I convert it to a language object? -- View this message in context: http://r.789695.n4.nabble.com/how-to-convert-string-to-object-tp2999281p2999299.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing l

[R] how to convert string to object?

2010-10-17 Thread lord12
temp = "~aparch(" temp1 = paste(temp,1, sep = "") temp2 = paste(temp1,1, sep = ",") temp3 = paste(temp2, ")",sep = "") temp 3 is a character but I want to convert to formula object. How do I do this? -- View this message in context: http://r.789695.n4.nabble.com/how-to-convert-string-to-object-

[R] R 2.12 How many downloads

2010-10-17 Thread Ajay Ohri
A general question- and excuse me if you find it irrelevant Are you tracking how many people finally download a specific R version by counting the number of downloads through log/ analytics software like GA etc? If so- can we see some numbers Ajay Websites- http://decisionstats.com http://dudeo

Re: [R] unbalanced repeated measurements Anova with mixed effects

2010-10-17 Thread Tal Galili
Hello Thijs, I think that as you wrote, the aov wouldn't work for you here (due to the unbalanced design). I'd recommend you to have a look at the {ez } package, which offers a nice wrapping of the car Anova functions. I've listed a bunch of tu

[R] unbalanced repeated measurements Anova with mixed effects

2010-10-17 Thread Thijs Muizelaar
Dear R-list members, I've been struggling with the proper setup for analysing my data. I've performed a route choice experiment, in which participants had to make a choice at each junction for the next road. During the experiment they received traffic information, but also encountered two diff

Re: [R] how to convert string to object?

2010-10-17 Thread Wu Gong
Hi, Please try ?parse and ?eval. Here is an example: text <- "3*6" parse(text=text) eval(parse(text=text)) - A R learner. -- View this message in context: http://r.789695.n4.nabble.com/how-to-convert-string-to-object-tp2999281p2999336.html Sent from the R help mailing list archive at Nabb

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Duncan Murdoch
Paulo Barata wrote: Dear Dr. Murdoch, My thanks to you and to Dr. Ligges for your replies. I will do my part and will inform Avira about what happened. If possible, I will send then the R 2.12.0 installation file for their examination. As Dr. Ligges said, it is quite possible indeed that a fals

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Paulo Barata
Dear Dr. Murdoch, My thanks to you and to Dr. Ligges for your replies. I will do my part and will inform Avira about what happened. If possible, I will send then the R 2.12.0 installation file for their examination. As Dr. Ligges said, it is quite possible indeed that a false positive alarm has

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Duncan Murdoch
Uwe Ligges wrote: I checked with two online services which ran more than 40 different virus scanners on the file and only Avira gave a warning. Hence I assume it is a false positive with Avira and you can go on with the installation. @ Duncan as the maintainer for the binary setup installer: I

Re: [R] dpois().......bizarre warning messages

2010-10-17 Thread Ben Bolker
Federico Bonofiglio gmail.com> writes: > consider the following script > > m<-4.95 > obs<-rpois(36,m) # i generate 36 realization from a poisson(m) > > hist(obs,freq=F) > curve(dpois(x,m),add=T,col="red") #i wish to overlay on the histogram the > theorical poisson density function > > errors a

Re: [R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Uwe Ligges
I checked with two online services which ran more than 40 different virus scanners on the file and only Avira gave a warning. Hence I assume it is a false positive with Avira and you can go on with the installation. @ Duncan as the maintainer for the binary setup installer: It might make sense

Re: [R] yum install - not working for installing R on Linux

2010-10-17 Thread noclue_
Thanks. Marc! I tried using 'sudo yum install R' - but got the following error -- $ sudo yum install R Loaded plugins: fastestmirror, security Loading mirror speeds from cached hostfile Setting up Install Process No package R available. Error: Nothing to do - will look into e

[R] How to install R on Linux via source compilation?

2010-10-17 Thread noclue_
How to install R on Linux via source compilation? Has anybody done it? I could not find step by step instructions online. I would appreciate if you could share your experience. Thanks. -- View this message in context: http://r.789695.n4.nabble.com/How-to-install-R-on-Linux-via-source-compila

[R] Cauchy distribution

2010-10-17 Thread evage
Hello all, I am a newbie in R so I would appreciate a little help on my topic :-) Firstly, I would like to fit a Cauchy distribution to my data. Any ideas for that? And secondly I would like to see the difference between my data and the fitting and how statistical important is that difference.

[R] dpois().......bizarre warning messages

2010-10-17 Thread Federico Bonofiglio
Dear Masters, I have a question to submit consider the following script m<-4.95 obs<-rpois(36,m) # i generate 36 realization from a poisson(m) hist(obs,freq=F) curve(dpois(x,m),add=T,col="red") #i wish to overlay on the histogram the theorical poisson density function errors are returned sain

[R] Help in Dirichlet Process density estimation

2010-10-17 Thread wangguojie2006
Hi, friends, I'm using "DPdensity" package in R to analyze my data (N=1000). The given examples in that package ran pretty good. But when I applied it to my data set, it keeps saying "matrix is not pd in chol subroutine". Is there anyone has ever used such package can share some ideas? Thank yo

[R] 64-bit R via ec2

2010-10-17 Thread david
Saw your post - please provide more info on using your images. 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, m

[R] R 2.12.0 - malware detect by antivirus software

2010-10-17 Thread Paulo Barata
Dear R-list members, I have just downloaded R 2.12.0 for Windows. When installing, my antivirus software detected some malware during the installation process. I use Windows XP SP3. My antivirus software is Avira Premium Security Suite, product version 10.0.0.542 (19/4/2010), search engine 8.02

Re: [R] Cauchy distribution

2010-10-17 Thread Ben Bolker
evage hotmail.com> writes: > Firstly, I would like to fit a Cauchy distribution to my data. Any ideas for > that? Start with library("MASS") fitdistr(x,"cauchy") > And secondly I would like to see the difference between my data and the > fitting and how statistical important is that differ

Re: [R] Question of "Quantile Regression for Longitudinal Data"

2010-10-17 Thread RKoenker
I've used the function rq.fit.sfn and rq.fit.panel to estimate a quantile regression on a panel data set.Now I would like to compute an statistic to measure the goodness of fit of this model (T-statistics and P-value ). Does someone know how could I do that? For formal inference you are be

[R] Cauchy distribution

2010-10-17 Thread evage
Hello all, I am a newbie in R so I would appreciate a little help on my topic :-) Firstly, I would like to fit a Cauchy distribution to my data. Any ideas for that? And secondly I would like to see the difference between my data and the fitting and how statistical important is that difference.

Re: [R] scaling on normlized data set

2010-10-17 Thread Ben Bolker
hosnaw gmail.com> writes: > I am using R and tried to normalize the data within each sample group using > RMA. When I tried to import the all the normalized expression data as a > single text file and make a boxplot, it showed discrepancy among the sample > groups. I tried to scale them or re-no

Re: [R] lattice xyplot - formatting of multiple Y variables when using subgroups

2010-10-17 Thread Prasenjit Kapat
On Sun, Oct 17, 2010 at 10:01 AM, Coen van Hasselt wrote: > Hi all, > > Using xyplot I want to print to Y variables (y1, y2) versus X, conditional > on the group. > How can I obtain a line (type="l") for one relationship (ie. y1 ~ x) and > points (type="p") for the other (y2 ~ x) ? > > library(lat

Re: [R] Class mode text isopen can read can write - too many open connections

2010-10-17 Thread Joshua Wiley
Hi, Is it a public URL (i.e., that we can try downloading from too)? Do you get the same error now matter where/what you download or just from that one place? Finally, if you are using Windows > XP, are you running R as an administrator (or very sure that the log file or whatever else you are cr

[R] Class mode text isopen can read can write - too many open connections

2010-10-17 Thread Santosh Srinivas
I am downloading data files using RCurl and everything works except till some limit is hit and says too many connections open It is a simple download using URL and I am writing the status in a tryCatch block to a log file. showConnections() description class mode text isopen can read can wr

Re: [R] Problem using BRugs

2010-10-17 Thread Uwe Ligges
On 15.10.2010 20:40, Sally Luo wrote: Hi R users, I am trying to call openbugs from R. And I got the following error message: ~ model is syntactically correct expected the collection operator c error pos 8 (e

Re: [R] yum install - not working for installing R on Linux

2010-10-17 Thread Marc Schwartz
On Oct 17, 2010, at 4:00 AM, noclue_ wrote: > > > I am trying to install R on Linux (Redhat 4). But 'yum' does not seem to > work... > thanks for your help/hints/suggestions in advance! > > > $ sudo cat /proc/version > Linux version 2.6.34.6-54.24.amzn1.i686 (mockbu...@build-31003

[R] lattice xyplot - formatting of multiple Y variables when using subgroups

2010-10-17 Thread Coen van Hasselt
Hi all, Using xyplot I want to print to Y variables (y1, y2) versus X, conditional on the group. How can I obtain a line (type="l") for one relationship (ie. y1 ~ x) and points (type="p") for the other (y2 ~ x) ? library(lattice) # create some sample data df<-data.frame(group=as.factor(c(rep("a"

Re: [R] Variable name as string

2010-10-17 Thread Peter Dalgaard
On 10/17/2010 11:25 AM, Jan private wrote: > So here is the next version. > > Why does the intercept needs lower.tail=TRUE to give the same result as > summary() for value=0? It doesn't. Or rather: For all coefficients, lower/upper tail depends on the _sign_ of t, so presumably you have a negati

Re: [R] Vector multiplication

2010-10-17 Thread Duncan Murdoch
Ron Michael wrote: Is there any operator in R, which will multiply each possible combination of the elements of 2 vectors? Suppose I have 2 vectors (1,2) and (1,2,3). If I multiply those 2, I should get:(1,2,3,2,4,6) See ?outer. For example, as.vector(outer(1:3, 1:2)) (but the results are

Re: [R] Vector multiplication

2010-10-17 Thread jim holtman
?outer > outer(1:2, 1:3, "*") [,1] [,2] [,3] [1,]123 [2,]246 > On Sun, Oct 17, 2010 at 3:25 AM, Ron Michael wrote: > Is there any operator in R, which will multiply each possible combination of > the elements of 2 vectors? Suppose I have 2 vectors (1,2) and (1,2,3)

[R] yum install - not working for installing R on Linux

2010-10-17 Thread noclue_
I am trying to install R on Linux (Redhat 4). But 'yum' does not seem to work... thanks for your help/hints/suggestions in advance! $ sudo cat /proc/version Linux version 2.6.34.6-54.24.amzn1.i686 (mockbu...@build-31003.build) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) #1 SMP

[R] Help on choosing the appropriate analysis method

2010-10-17 Thread Juhász Péter
Dear R-help, I'd like ask for your opinion on choosing the "right" strategy for a particular dataset. We conducted 24-hour electric field measurements on 90 subjects. They are grouped by job (2 categories) and location (3 categories). There are four exposure metrics assigned to each subject. An

[R] Vector multiplication

2010-10-17 Thread Ron Michael
Is there any operator in R, which will multiply each possible combination of the elements of 2 vectors? Suppose I have 2 vectors (1,2) and (1,2,3). If I multiply those 2, I should get:(1,2,3,2,4,6) Thanks, [[alternative HTML version deleted]] ___

Re: [R] Variable name as string

2010-10-17 Thread Jan private
So here is the next version. Why does the intercept needs lower.tail=TRUE to give the same result as summary() for value=0? # See Verzani, simpleR (pdf), p. 80 coeff.test <- function(lm.result, idx, value) { # idx = 1 is the intercept, idx>1 the other coefficients # null hypothesis: coeff = v

Re: [R] Variable name as string

2010-10-17 Thread Peter Dalgaard
On 10/17/2010 05:41 AM, Jan private wrote: > Also, as a non-professional, I would like to know whether the function > is valid for all coefficients of lm(), e.g. coeff.test(lm(N ~ D + H), H, > "H", 70). I am aware that Verzani gives a different formula for testing > the intercept. In a word, no,