Re: [R] comparing two data files

2010-10-19 Thread Mike Marchywka
> From: nicol...@buffalo.edu > Date: Tue, 19 Oct 2010 18:23:27 -0400 > To: r-help@r-project.org > Subject: [R] comparing two data files > > I have 2 large data files that I need to compare and find the differences > between data file x and data file y in o

[R] RWeka - Error in model.frame.default - evaluate_Weka_classifier

2010-10-19 Thread Andreas Jansson
Hi, First of all, I'm a complete rookie to R (~2 weeks). But anyway, I'm trying to use the RWeka interface for C4.5 (J48) classification. As a proof of concept I'm using the Iris data set to create a training set of 30 instances (10 per species) and use the remaining 120 instances as my test set.

[R] Fix for xlsReadWrite 1.5.2 running in R2.12.0 (32-bit) on a Win7 64-bit platform

2010-10-19 Thread Hans-Peter Suter
Argh, just now I saw a scrambled start-up message when running xlsReadWrite1.5.2 in R2.12.0 (32-bit) on a Win7 64-bit platform. If you have this situation and use xlsReadWrite 1.5.2 (probably all earlier versions also) you can download a quick fix, see below. I don't know if this also affects Vista

[R] DLL not found

2010-10-19 Thread Remko Duursma
Dear R-helpers, I have a fresh installation of windows vista, and R 2.12.0 (session info below). Problem: > require(sp) Loading required package: sp Error in library.dynam(lib, package, package.lib) : DLL 'lattice' not found: maybe not installed for this architecture? > require(lattice) Loadi

Re: [R] DLL not found

2010-10-19 Thread Duncan Murdoch
On 19/10/2010 6:50 PM, Remko Duursma wrote: Dear R-helpers, I have a fresh installation of windows vista, and R 2.12.0 (session info below). I have seen a similar error reported when someone had a copy of lattice in a library that came ahead of the system one. What does .libPaths() show you

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
Hi Duncan, this is it: > .libPaths() [1] "c:\\remko\\rstuff\\library" "C:/PROGRA~1/R/R-212~1.0/library" and you are right, I do have lattice installed in the latter I deleted it from the second library, but it still gives me the same error message. Remko --

Re: [R] DLL not found

2010-10-19 Thread Remko Duursma
Ok so it works when I delete it from the first library (and not the second). I misunderstood... thanks! Remko Hi Duncan, this is it: > .libPaths() [1] "c:\\remko\\rstuff\\library" "C:/PROGRA~1/R/R-212~1.0/library" and you are right, I do have lattice installed in the latter I de

[R] sampling from normal

2010-10-19 Thread solafah bh
Hello If i want to resample from the lower tail of normal distribution , are these commands equivelant??  lower tail :qnorm(runif(n,0,pnorm(a))) if a is a lower tail bound or  lower tail:qnorm(p*runif(n)) if p is the probability of each interval(the observations are divided to intervals)   Regard

[R] plot CI and mortality rate

2010-10-19 Thread XINLI LI
Dear R Users: I have the individual mortality rate and 95% CI of 100 hospitals, how to do the plot with the individual hospital in the Yaxis, and the mortality rate and 95% CI in the Xais and a overall mean as a reference line? Thanks and regards, Xin [[alternative HTML version

Re: [R] Clustering with ordinal data

2010-10-19 Thread Michael Bedward
Hello Steve, > I've been asked to help evaluate a vegetation data set, specifically to > examine it for community similarity. The initial problem I see is that the > data is ordinal.   At best this only captures a relative ranking of > abundance and ordinal ranks are assigned after data collection

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-19 Thread Dennis Murphy
Hi: This is how you could do the same in ggplot2; geom_ribbon() does the shading. For your example, it seemed reasonable to put in reference lines, especially since the upper limits of one confidence band abutted the lower limits of the other in group a, so I averaged the upper and lower limits to

[R] remove unused variable and data

2010-10-19 Thread Jumlong Vongprasert
Dear All I have this > ls() [1] "IWJR.complete""IWJR.missing" "IWJR.reg.temp" [4] "IWJR.reg.temp.x" "IWJR.reg.temp.y" "IWJR.temp" [7] "Power.record.100.3.5" "col.delete" "correlation.100.3.5" [10] "i""index.temp" "iterate" [

Re: [R] remove unused variable and data

2010-10-19 Thread Henrique Dallazuanna
Try this: rm(list = setdiff(ls(), 'poprho.3')) On Tue, Oct 19, 2010 at 11:29 PM, Jumlong Vongprasert < jumlong.u...@gmail.com> wrote: > Dear All >I have this > > ls() > [1] "IWJR.complete""IWJR.missing" "IWJR.reg.temp" > [4] "IWJR.reg.temp.x" "IWJR.reg.temp.y" "I

[R] is there a way to update both packages if they occur in 2 libraries?

2010-10-19 Thread Chris Howden
Hi everyone, I’ve recently added a private library as a way to manage my R libraries. And I did this by simply copying my old library to a new folder and then linking this to R by setting my R_LIBS environmental variable in .Renviron. However I have run into a problem. When I update my pa

Re: [R] plot CI and mortality rate

2010-10-19 Thread Ben Bolker
XINLI LI gmail.com> writes: > > Dear R Users: > >I have the individual mortality rate and 95% CI of 100 hospitals, > how to do the plot with the individual hospital in the Yaxis, and the > mortality rate and 95% CI in the Xais and a overall mean as a reference > line? Something lik

Re: [R] sampling from normal

2010-10-19 Thread Wu Gong
Hi Solafah, You are right that two commands are equivalent when p= pnorm(a). You can check the results by following codes. n <- 5 a <- -1 set.seed(123456) qnorm(runif(n,0,pnorm(a))) p <- pnorm(a) set.seed(123456) qnorm(p*runif(n)) Anyway, the elements of the lower tail are not chosen equally by

Re: [R] scatter.smooth() fitted by loess

2010-10-19 Thread Dennis Murphy
Hi: I agree with Ista's point that you shouldn't be doing loess with these data (x and y both need to be continuous for loess, but your x is discrete), but you shouldn't be computing boxplots at each YMRS_Sum value either because you don't have enough resid observations at Sum = 3 and 4. A combina

[R] Accessing table elements and escape characters

2010-10-19 Thread sachinthaka . abeywardana
Hi All, Are there any escape characters that I should be aware of when using table.read? I don't have any '#' characters in this table. I get the error: A<-read.table("P:/temp.csv",header=TRUE, sep=","); Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 11018 d

[R] glm with linear restrictions

2010-10-19 Thread mege
I'm looking for a function or package to estimate a glm with linear restrictions (e.g. the sum of some parameters needs to be zero). I found the function orlm in the package ic.infer which works for lm models, but I need it for glm. Thanks, Markus __

Re: [R] plot CI and mortality rate

2010-10-19 Thread Dennis Murphy
Hi: Following up on Ben's suggestion re ggplot2, here's a manufactured example: # Fake data: mortrate <- round(runif(100), 3) dd <- data.frame(rate = mortrate, moe = 1.96 * sqrt(mortrate * (1 - mortrate))/10, hosp = factor(paste('H', 1:100, sep = ''))) dim(dd) [1] 100 3 # Set

[R] question on optim() fn.

2010-10-19 Thread sharkoil
i am trying to use optim() fn in R to estimate mle of my pdf. even though I am able to get the results, but there are always warning message, which says that NaN produced. I am not very sure if I should ignore these warning message since I have got solution without error message. I am wondering

Re: [R] glm with linear restrictions

2010-10-19 Thread Bill.Venables
If b1+b2+b3 = 0 can't you put b3 = -b1-b2 and re-write the model in terms of b1 and b2 alone? The model is stil (g)linear. If the parameters to which you refer corresponds to the levels of a factor, then you can use the contr.sum contrast matrices. It essentailly does the above. -Origin

[R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
# Let's say I have 5 objects, object_1, object_2, etc. for (i in 1:5) { assign(paste("object_",i, sep=""), i+500) } # Now, for whatever reason, I don't know the names of the objects I've created, but I want to operate on them. list<-ls(pattern="^obj") #Is get best? for (l in list) { cat("

Re: [R] is get() really what I want here?

2010-10-19 Thread Joshua Wiley
Hi Daniel, get() will work for any object, but cat() may not. cat() should work for arrays, but it will be messy even for relatively small ones. For example, run: cat("Hello", array(1:100, dim = c(10, 10)), sep = " ") What are you really trying to do? If you are just trying to figure out what

[R] Adding Legend about two quantile lines at ggplot

2010-10-19 Thread YN Kim
Hi, all. I'd like to add legend on my graph but I can't. My code is follows. library(ggplot2) score1<-rnorm(100,0,5) score2<-rnorm(400,10,15) mydata<-data.frame(score1,score2) ggplot(mydata,aes(y=score2,x=score1))+geom_point()+stat_quantile(quantiles=c(0.50),col="red")+stat_quantile(quantiles=c(0

Re: [R] is get() really what I want here?

2010-10-19 Thread Daniel Weitzenfeld
Hi Josh, What I'm really trying to do is to refer to objects whose names I have stored in a vector. This example was arbitrary. I do a lot of looping through files in the working directory, or through objects in the namespace, and I'm confused about how best to call upon them from within a loop. T

[R] Generate variable with Bivariate Normal Distribution

2010-10-19 Thread สถาบันวิจัยและพัฒนา มหาวิทยาลัยราชภัฏอุบลร าชธานี
Dear All I want to generate variable with Bivariate Normal Distribution by use mean1 = a, variance1 = b, mean2 = c, variance2 = d, rho = e. How I can do this. Many Thanks. IRD [[alternative HTML version deleted]] ___

Re: [R] is get() really what I want here?

2010-10-19 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 20.10.2010 07:58:29: > Hi Josh, > What I'm really trying to do is to refer to objects whose names I have > stored in a vector. This example was arbitrary. > I do a lot of looping through files in the working directory, or through > objects in the namesp

Re: [R] is get() really what I want here?

2010-10-19 Thread Joshua Wiley
On Tue, Oct 19, 2010 at 10:58 PM, Daniel Weitzenfeld wrote: > Hi Josh, > What I'm really trying to do is to refer to objects whose names I have > stored in a vector.  This example was arbitrary. > I do a lot of looping through files in the working directory, or through > objects in the namespace,

Re: [R] superpose.polygon, panel.polygon and their colors

2010-10-19 Thread ottorino
Il giorno mar, 19/10/2010 alle 11.12 -0700, Dieter Menne ha scritto: Thanks Dieter for your help, but unfortunately your suggestion results only in changing the color of the *lines* and not the color of the *area* of the polygon. I also tried to call "col" from within the panel.superpose xyplot(

<    1   2