Re: [R] Matching multiple columns in a data frame

2009-05-06 Thread Bill.Venables
> A[with(A, paste(C1, C2, sep = "\r")) %in% with(B, paste(C1, C2, sep="\r")), ] C1 C2 19 A 200 (Using sep = "\r" is perhaps a little too cautious.) Bill Venables http://www.cmis.csiro.au/bill.venables/ -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@

[R] Matching multiple columns in a data frame

2009-05-06 Thread Raghavan, Nandini [PRDUS]
Hello, I am trying to extract a subset of a dataframe A (2 columns) by extracting all entries in A (several repeated entries) that match dataframe B in both columns. For example, part of A and B are shown below. The following does not seem to work correctly. This only seems to select on the

Re: [R] Help with lme4 model specification

2009-05-06 Thread Emmanuel Charpentier
Le mercredi 06 mai 2009 à 15:21 -0700, boeinguy2 a écrit : > I am new to R and am trying to specify a model for mixed model analysis. > When I run the following model I get an error: > > AAT<- lmer(Y ~ S + A + (1|S:A/H), data=AT, REML=True) > > The error looks like this: > > Error in Spar_loc:`

Re: [R] dotplot: labeling coordinates for each point

2009-05-06 Thread Deepayan Sarkar
On Wed, May 6, 2009 at 6:54 PM, Qifei Zhu wrote: > Hi Deepayan, > > Thanks for the reply. here is a very simple example of what I'm looking for: > >> y=c(100,0,-20) >> x=c("Atlanta", "Baltimore", "Berkeley CA") >> dotplot(y~x, xlab="Store", ylab="Revenue",main="test", scale=list(rot=60)) > > Basic

[R] Question about spatial probit model using zelig command

2009-05-06 Thread Lynette Boswell
I am continually receiving this error and wonder if someone may assist me. Error in eval(expr, envir, enclos) : NA/NaN/Inf in foreign function call (arg 17) In addition: Warning message: In glm.fit(x = X, y = Y, weights = weights, start = start, etastart = etastart, : fitted probabilities num

Re: [R] I updated/reinstalled ggplot2 and the trouble started...

2009-05-06 Thread Tena Sakai
Hi Ian, Per your suggestion, I reinstalled R 2.9.0, then I reinstalled ggplot2 on top. The problem persists. Here's the what happens after the installation: > qplot (carat, price, data = diamonds, alpha = I(1/10)) Warning message: In grid.Call.graphics("L_points", x$x, x$y, x$pch, x$size)

Re: [R] convert large integers to hex

2009-05-06 Thread Gabor Grothendieck
rSymPy (http://rsympy.googlecode.com) can do that: > library(rSymPy) Loading required package: rJava > sympy("hex(12345)") [1] "0x3039" > format.hexmode(as.numeric(12345)) [1] "3039" > sympy("hex(6595137340052185552)") [1] "0x5b86a277deb9a1d0L" as can r-bc package (http://r-bc.googlecode.com - no

Re: [R] convert large integers to hex

2009-05-06 Thread jim holtman
You can use the 'bc' command (use Cygwin if on Windows); /cygdrive/c: bc bc 1.06 Copyright 1991-1994, 1997, 1998, 2000 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. x=6595137340052185552 obase=16 x 5B86A277DEB9A1D0 You can call this

Re: [R] dotplot: labeling coordinates for each point

2009-05-06 Thread Qifei Zhu
Hi Deepayan, Thanks for the reply. here is a very simple example of what I'm looking for: > y=c(100,0,-20) > x=c("Atlanta", "Baltimore", "Berkeley CA") > dotplot(y~x, xlab="Store", ylab="Revenue",main="test", scale=list(rot=60)) Basically it produces a graph of city on the x-axis and its associa

Re: [R] by-group processing

2009-05-06 Thread jim holtman
Ths should do it: > do.call(rbind, lapply(split(x, x$ID), tail, 1)) ID Type N 45900 45900I 7 46550 46550I 7 49270 49270E 3 On Wed, May 6, 2009 at 6:09 PM, Max Webber wrote: > Given a dataframe like > > > data >ID Type N > 1 45900A 1 > 2 45900B 2 > 3

[R] Building 2.9.0 on Solaris 10 U6 x86

2009-05-06 Thread Reginald Beardsley
I've run into a number of problems. I'm not sure where they belong, so I thought I'd send it here in hope someone will send them where they do belong. It mostly seems to be either errors in the autoconf input or system header weirdness. There was one genuine compiler bug when compiling savel

Re: [R] Add trend line to XYPlot using a subset of the original data

2009-05-06 Thread Deepayan Sarkar
On Wed, May 6, 2009 at 12:29 PM, kryberg wrote: > > I've created an xyplot that I want to add a trend line to using a subset of > the data. > > The xyplot is > > xyplot(X9444500~WY,data=mynewdata,xlim=c(1900,2020),ylab="TEST", > xlab="",ylim=c(100,10),scales=list(x=list(at=c(1900,1920,1940,196

Re: [R] dotplot: labeling coordinates for each point

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 7:04 PM, Qifei Zhu wrote: > Hi Deepayan, > > Thanks for the hint. I spent some time on the research but haven't got any > luck in writing the custom panel function for the conditional labeling of > points in a graph. Could you please provide some more thoughts and probably

Re: [R] levelplot question

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 8:58 AM, Greg Snow wrote: > The function that is doing the color assignments is level.colors in the > lattice package. > Looking at the code confirms that the number of colors should be 1 less than > the length > of the at variable (the documentation implies that it should

Re: [R] by-group processing

2009-05-06 Thread Jorge Ivan Velez
Dear Max, By using "d" instead of "data" for your data set, here is one way: # First order the data by ID d <- with(d, d[order(ID),] ) # Then use tapply to get the indexes for the maximum values d[cumsum(with(d, tapply(N, ID, which.max))),] # ID Type N # 7 45900I 7 # 24 46550I 7 # 10 492

Re: [R] Bumps chart in R

2009-05-06 Thread Mike Lawrence
(cross posting to the ggplot2 group for posterity) Here's how I'd approach it: library(ggplot2) text = letters[1:20] tal1 = rnorm (20,5,2) tal2 = rnorm (20,6,3) dif = tal2-tal1 df0 = data.frame(text,tal1,tal2) df = melt( data = df0 , id.vars = 'text' , variable_name = 'tal

Re: [R] levelplot question

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 12:00 AM, Antje wrote: > Hi Greg and all the others, > > thanks for your answer. The color-vector has the same length like the > at-vector but the recycling cannot be the reason, because only values > slightly above my "threshold" doe not appear blue. > I cannot find a good

Re: [R] Heatmap: draw horizontal line

2009-05-06 Thread Paul Evans
Thanks Matthias! Exactly what I was looking for. Paul From: Matthias Kohl Cc: r-h...@stat.math.ethz.ch Sent: Wednesday, May 6, 2009 2:06:22 PM Subject: Re: [R] Heatmap: draw horizontal line Is heatmap.2(mat,Rowv=NA,trace = 'none',key=F, add.expr = abline(h

Re: [R] please, a help or information

2009-05-06 Thread Francisco J. Zagmutt
Estimado Fernando, I am afraid that we will not be able to help you until you provide a reproducible example. See the information at the bottom of my email about the posting guide. Also, you may be interested in joining the Spanish R-help list here https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Lattice: use levelplot as panel for wireframe

2009-05-06 Thread Deepayan Sarkar
On Tue, May 5, 2009 at 4:07 AM, Anton Bossenbroek wrote: > Hi, > > I want to draw a figure similar to > http://dsarkar.fhcrc.org/lattice/book/images/Figure_13_07_stdBW.png from > http://lmdvr.r-forge.r-project.org/figures/figures.html (figure 13.7) . > However instead of using a contour plot as a

[R] Biostatistician Job Openings

2009-05-06 Thread Frank E Harrell Jr
We have openings for biostatisticians at all levels: B.S., M.S., Assistant Professor, Associate Professor, and full Professor. Details are at http://biostat.mc.vanderbilt.edu/JobOpenings Frank Harrell Chair, Dept. of Biostatistics Vanderbilt University School of Medicine ___

[R] please, a help or information

2009-05-06 Thread bernardo lagos alvarez
Hi users R list I have been running some codes for some simulations. Such intensive use runif, nlm and simpleError("...") functions no more. But still remain the error that has been greatly discussed in the list of users of R, the problem !crashes RGui.¡ "R for Windows GUI front-end has encounte

Re: [R] quick square root axes

2009-05-06 Thread Carl Witthoft
Here's a Q&D bit of code I wrote up a while back. Dunno if it'll be of any use in setting up your tickmarks. # x, n same meaning as in pretty() # update: check for x neg or zero # ... is for other args to pretty() prettylog<- function(x,n=10,base=10,...) { x<-unlist(x) if (min(x

[R] Help with lme4 model specification

2009-05-06 Thread boeinguy2
I am new to R and am trying to specify a model for mixed model analysis. When I run the following model I get an error: AAT<- lmer(Y ~ S + A + (1|S:A/H), data=AT, REML=True) The error looks like this: Error in Spar_loc:`:` : NA/NaN argument In addition: Warning messages: 1: In model.matrix.def

[R] by-group processing

2009-05-06 Thread Max Webber
Given a dataframe like > data ID Type N 1 45900A 1 2 45900B 2 3 45900C 3 4 45900D 4 5 45900E 5 6 45900F 6 7 45900I 7 8 49270A 1 9 49270B 2 10 49270E 3 18 46550A 1 19 46550B 2 20 46550C 3 21 46550

[R] RMySQL and non-installer mysql

2009-05-06 Thread Jose Quesada
Hi all, I'm running mysql on windows server 2008 64, but I just unzipped files. There's no installer and no registry entry. When using RMySQL, it seems that it needs to look at the registry: > library("RMySQL") Loading required package: DBI Error in utils::readRegistry("SOFTWARE\\MySQL AB", hive

[R] beta

2009-05-06 Thread Dr. Alireza Zolfaghari
Hi List Can you tell me how I can get the probability of L>=2.5 when the mean is 5.5 and á = 2.28409 and â = 6.09091? using beta function indeed? regards, [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.et

Re: [R] NLMINB() produces NaN!

2009-05-06 Thread David Winsemius
I have trimmed the address to the mixed models list since you (and I ) are asked in the Posting Guide to pick one of the lists rather than cross posting. Have you looked at the possibility of using the try function around your individual optim calls? ?try -- David Winsemius - Origina

Re: [R] changing variables in a dataset

2009-05-06 Thread David Winsemius
Did you actually test that purported solution? I get NA's, which is not surprising to me since the levels of chickwts$feed are character valued. When I try as.numeric(chickwts$feed) I get the numeric values that I believe are being requested. The FAQ regarding conversion from an inadvertent i

Re: [R] lattice levelplot axis + custom annotations

2009-05-06 Thread Deepayan Sarkar
On Sat, May 2, 2009 at 8:05 PM, Alex Reynolds wrote: > On May 2, 2009, at 5:08 PM, David Winsemius wrote: > >> Not sure since you have not provided a reproducible example and not really >> defined what "annotations" means. > > By annotations, I mean that I want to draw an object (set of poiygon()

Re: [R] Hmisc package: deff() command's formula for the design effect

2009-05-06 Thread Thomas Lumley
On Wed, 6 May 2009, jjh21 wrote: Hello, I have been using the Hmisc package's deff() command for some research with clustered data. I noticed that the formula to calculate the design effect seems a bit different. The formula for the DE is: 1 + rho*(B - 1) In most resources I have seen the fo

Re: [R] setting key boxes in xyplot

2009-05-06 Thread Deepayan Sarkar
On Fri, May 1, 2009 at 6:28 AM, David Winsemius wrote: > > On May 1, 2009, at 8:51 AM, steve_fried...@nps.gov wrote: > >> David and the list >> >> Yes the graph is produced with the code I submitted. However, I was not >> clear in my initial post. and it is totally my mistake for taking up >> ever

Re: [R] Bumps chart in R

2009-05-06 Thread Andreas Christoffersen
Okay - first off: Thank you all for you kind help so far. (Especially to hadly for writing ggplot2). I feel that I am beginning to understand the grammar of graphics - but obviously still have a long way to go. Some of the road I need to travel has to do with basic R. Anyway ; instead of wrting a n

Re: [R] Print to File Formatting

2009-05-06 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Brigid Mooney > Sent: Wednesday, May 06, 2009 1:42 PM > To: r-help@r-project.org > Subject: [R] Print to File Formatting > > Hello, > > I am writing out to a file and have two q

[R] When was the package relaimpo first introduced in R?

2009-05-06 Thread Dimitri Liakhovitski
Hello! I am wondering when the package relaimpo was first introduced in R? Or maybe there is a way to look it up? I am not seeing it in the help file. -- Dimitri Liakhovitski MarketTools, Inc. dimitri.liakhovit...@markettools.com __ R-help@r-project.o

[R] Hmisc package: deff() command's formula for the design effect

2009-05-06 Thread jjh21
Hello, I have been using the Hmisc package's deff() command for some research with clustered data. I noticed that the formula to calculate the design effect seems a bit different. The formula for the DE is: 1 + rho*(B - 1) In most resources I have seen the formula for B to simply be the average

Re: [R] How to do Naive Bayes in R?

2009-05-06 Thread spencerg
help.search('bayes') only searches installed packages. To go beyond that, you might try the following: library(RSiteSearch) bayes <- RSiteSearch.function('bayes', 999) summary(bayes) # This produces a Parato analysis of packages in terms of references # to the search term in their

[R] Print to File Formatting

2009-05-06 Thread Brigid Mooney
Hello, I am writing out to a file and have two quick questions that I can't seem to track down the correct answers for. Luckily, I *think* they are both simple enough that someone might be able to point me in the right direction on them without too much trouble. Both questions relate to the proc

Re: [R] rmysql query help

2009-05-06 Thread Duncan Murdoch
On 5/6/2009 3:47 PM, Aaron Sims wrote: R HELP, I am trying to use an R script to connect to a mysql database. I am having a problem using a variable in the where clause that contains a "space" in its value. If I include the variable inside the quotes of the query - i think it is searching fo

Re: [R] How to do Naive Bayes in R?

2009-05-06 Thread Dylan Beaudette
On Wednesday 06 May 2009, Tim LIU wrote: > I am wondering if anybody here have a simple example in R for Naive > Bayes. > > For example, I can do k-means clustering on the "iris" data - > > data(iris) > cl <- kmeans(iris[,1:4], 3) > cl$cluster > cbind(1:150,iris$Species) > > === > > But how

[R] Add trend line to XYPlot using a subset of the original data

2009-05-06 Thread kryberg
I've created an xyplot that I want to add a trend line to using a subset of the data. The xyplot is xyplot(X9444500~WY,data=mynewdata,xlim=c(1900,2020),ylab="TEST", xlab="",ylim=c(100,10),scales=list(x=list(at=c(1900,1920,1940,1960,1980,2000,2020),axs="r",tck=-1),y=list(log=TRUE,tck=-100,at=

[R] How to do Naive Bayes in R?

2009-05-06 Thread Tim LIU
I am wondering if anybody here have a simple example in R for Naive Bayes. For example, I can do k-means clustering on the "iris" data - data(iris) cl <- kmeans(iris[,1:4], 3) cl$cluster cbind(1:150,iris$Species) === But how to do Naive Bayes classification in the same "iris" data?

[R] rmysql query help

2009-05-06 Thread Aaron Sims
R HELP, I am trying to use an R script to connect to a mysql database. I am having a problem using a variable in the where clause that contains a "space" in its value. If I include the variable inside the quotes of the query - i think it is searching for the name of the variable in the databa

Re: [R] dependency ‘Matrix’ is not availabl e when installing Rcmdr

2009-05-06 Thread Uwe Ligges
Argh, it disappeared. Probably a bug in my scripts that removed the old version of Matrix from the Windows binary repository for R-2.8.x (new versions of Matrix won't pass checks under the outdated version of R). I will compile an old version tomorrow and make it available again. Sorry for the

[R] convert large integers to hex

2009-05-06 Thread Sundar Dorai-Raj
Hi, I'm wondering if someone has solved the problem of converting very large integers to hex. I know about format.hexmode and as.hexmode, but these rely on integers. The numbers I'm working with are overflowing and losing precision. Here's an example: x <- "6595137340052185552" # stored as charac

Re: [R] [BioC] 'RG' looks like a pre-2.4.0 S4 object: please recreate it

2009-05-06 Thread Vincent Carey
supply result of sessionInfo() -- undoubtedly you have outdated packages installed. to work with the current image and get efficient support from this list, use R 2.9 and install packages using biocLite. do not cross-post to r-help. On Wed, May 6, 2009 at 12:53 PM, Barbara Cegielska wrote: > I w

[R] remote browser and per-session dir

2009-05-06 Thread Paul Gilbert
Running R on a remote system I can almost never get help.start() to work, because it passes the request to my local browser, which cannot see the "links in per-session dir" created in /tmp on the remote machine. Is there a way to put the "per-session dir" in my home dir (which is NFS mounted)

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Frank E Harrell Jr
Simon Pickett wrote: My institute uses SAS religiously, I am the only R "heathen". I have resisted learning to use SAS because I dont see the point after years of using R and I like being able to do everything using one program. However, my colleagues maintain that SAS is "better" for program

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Peter Flom
Simon Pickett wrote >My institute uses SAS religiously, I am the only R "heathen". > >I have resisted learning to use SAS because I dont see the point after years >of using R and I like being able to do everything using one program. >However, my colleagues maintain that SAS is "better" for prog

[R] Help with JADE package

2009-05-06 Thread Martina Gandini
Dear R users, I have a problem with the JADE package, in particular with the JADE function. If I try to separate less independent sources than the extracted signals, it gives me the following warning "Error in solve.default(B) : only square matrices can be inverted" Instead, taking the same sign

Re: [R] General Question about Graphics

2009-05-06 Thread Peter Flom
steve_fried...@nps.gov wrote > >I have encountered a situation with regards to plotting barcharts with >associated error bars. My search for clues on how to accomplish this >turned up some interesting information. Basically, I found that including >error bars with barplots is not desirable and he

Re: [R] NLMINB() produces NaN!

2009-05-06 Thread Ravi Varadhan
Hi, Can you provide a little more information about your problem? If you are trying to find a local maximum of "maxphi", then you need to tell that to optim(),. It tries to find a local minimum by default. You can do this via the `fnscale' control parameter (control = list(fnscale = -1)). If t

Re: [R] JGR

2009-05-06 Thread Stefan Grosse
On Tue, 05 May 2009 15:12:00 +0200 "r...@quantide.com" wrote: RC> The point is that one Cpu stays at 100% for all time JGR is up. RC> Any ideas? RC> Andrea I believe it is a bug with JGR. Unfortunately it is existing for quite some time now. (I am using Fedora Linux since years and try it from t

[R] NLMINB() produces NaN!

2009-05-06 Thread H c
I am having the same problem as one Rebecca Sela(see bellow). On 21/12/2007 12:07 AM, Rebecca Sela wrote: >* I am trying to optimize a likelihood function using NLMINB. After running >without a problem for quite a few iterations (enough that my intermediate >output extends further than I can s

Re: [R] Heatmap: draw horizontal line

2009-05-06 Thread Matthias Kohl
Is heatmap.2(mat,Rowv=NA,trace = 'none',key=F, add.expr = abline(h = c(3.5,5.5), lwd = 3)) what your are looking for? hth, Matthias Paul Evans schrieb: Hi, I wanted to draw a heatmap with some horizontal lines. For example: #-- code -- mat <- matrix(-1:1,7,9) heatmap.2(mat,Rowv=NA

[R] dependency ‘Matrix’ is not availabl e when installing Rcmdr

2009-05-06 Thread John Sorkin
R 2.8.1 Windows XP Any suggestions for addressing the problem listed below, obtained when installing Rcmdr The downloaded packages are in C:\Documents and Settings\jsorkin\Local Settings\Temp\RtmpaxlG6g\downloaded_packages updating HTML package descriptions Warning message: dependency ‘Matr

[R] Need help building combined model

2009-05-06 Thread E Cell
I have two kind of variables. One kind where the values are continuous and ranges from -1 to 5, and the other is boolean (i.e. true or false). For example: V1   V2  V3 V4 V5  V6 0.1  0.4   1    0   -1   3.7 0.4  0.1   2   -1   0    3.7 and V1  V2  V3 0 1    0 0     0    1 I want to make

[R] Heatmap: draw horizontal line

2009-05-06 Thread Paul Evans
Hi, I wanted to draw a heatmap with some horizontal lines. For example: #-- code -- mat <- matrix(-1:1,7,9) heatmap.2(mat,Rowv=NA,trace = 'none',key=F) #end code - In this heatmap, I want to subgroup the rows. For instance, I would like to group rows 5,6 & 7 together, and would

Re: [R] Positioning a legend via X and Y coordinates

2009-05-06 Thread Duncan Murdoch
On 5/6/2009 1:08 PM, Steve Murray wrote: Dear R Users, I'm able to display a legend using the following code: legend("topright", c("Simulation", "Observation"), fill=2:3, bty="n") However, this causes the legend to be positioned too close to the bars in my barplot. I'd like to move the lege

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Tom Short
Another tool I find useful is Matthew Dowle's data.table package. It has very fast indexing, can have much lower memory requirements than a data frame, and has some built-in data manipulation capability. Especially with a 64-bit OS, you can use this to keep things in memory where you otherwise woul

[R] Positioning a legend via X and Y coordinates

2009-05-06 Thread Steve Murray
Dear R Users, I'm able to display a legend using the following code: > legend("topright", c("Simulation", "Observation"), fill=2:3, bty="n") However, this causes the legend to be positioned too close to the bars in my barplot. I'd like to move the legend up slightly. I have been trying to det

[R] 'RG' looks like a pre-2.4.0 S4 object: please recreate it

2009-05-06 Thread Barbara Cegielska
I would like to load ApoAI.RData. During the operation of reading this data an error occurs. There is also a problem with STF file. > library (limma) > load("ApoAI.RData") Warning message: 'RG' looks like a pre-2.4.0 S4 object: please recreate it > objects() [1] "RG" > names(RG) [1] "R" "G

Re: [R] Summary help

2009-05-06 Thread mathallan
To glm is glm(log(mydata)~log(max_data)*as.factor(grp),family=Gamma(link="log")) And I was wondering if you can read the scale and shape from summary There a quite a few "gamma models" around, so you should tell us more. glmXXX? lmer? Dieter __ R-

Re: [R] [Fwd: loading SPOT file]

2009-05-06 Thread Martin Morgan
Hi Barbara -- ask on the Bioconductor mailing list. http://bioconductor.org/docs/mailList.html Include the output of the command sessionInfo() after the failure. Be sure to update to a current version of R / Bioconductor, for the latter following 'Update installed Bioconductor packages' at

[R] [Fwd: loading SPOT file]

2009-05-06 Thread Barbara Cegielska
--- Begin Message --- I have problem with loading SPOT files. Sample of my operations in R object > fromfile=TRUE > fext="spot" > rawboxplot=TRUE > flagi="Flags" > > f<-function(x) as.numeric(x$Flags > -99) > targets<-readTargets("ApoAITargets.txt") > > if (fromfile){ + files<-dir(pattern=fext

Re: [R] Create Pie chart from .csv file

2009-05-06 Thread Gabor Grothendieck
The sqldf package allows you to apply SQL statements to R data frames: http://sqldf.googlecode.com On Wed, May 6, 2009 at 12:08 PM, DonkeyRhubarb wrote: > > > Ive found out a way around my problem. I was trying to plaot a histogram of > strings, but I had to change it into integers. I ran an sql

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Greg Snow
In my opinion, no statisticians toolbox should contain only 1 tool (even if it is as amazing a tool as R). Learning the different tools helps you appreciate when each are the most appropriate to use and learn different ways of looking at problems. There are some tasks that I (it could easily

Re: [R] Create Pie chart from .csv file

2009-05-06 Thread DonkeyRhubarb
Ive found out a way around my problem. I was trying to plaot a histogram of strings, but I had to change it into integers. I ran an sql query on the original DB that I got the CSV file from and used COUNT to get the number of each unique item in a given column. I then used these numbers to create

Re: [R] Houston, TX Users Group

2009-05-06 Thread hadley wickham
Hi Robert, I'm organising one - sign up to the mailing list, http://groups.google.com/group/houston-r. I'm hoping to organise our first meeting this summer. Hadley On Wed, May 6, 2009 at 10:15 AM, Robert Sanford wrote: > I'm looking for a Users Group in or near Houston, TX. > > Many thanks! >

Re: [R] problem with ggplot2 boxplot, groups and facets

2009-05-06 Thread stephen sefick
The code is real, yes. But I can not copy and paste it right out of the email into an R session and see what you are talking about. Look at ?dput as a way of posting data to the list. Stephen Sefick On Wed, May 6, 2009 at 1:52 AM, Zeljko Vrba wrote: > On Tue, May 05, 2009 at 09:21:49PM -0400

Re: [R] General Question about Graphics

2009-05-06 Thread Mike Lawrence
Check out ggplot2: http://had.co.nz/ggplot2/ Particularly the book: http://had.co.nz/ggplot2/book For error bars on bar plots specifically: http://had.co.nz/ggplot2/geom_errorbar.html Mike On Wed, May 6, 2009 at 12:34 PM, wrote: > > Greetings > > I have encountered a situation with regards t

Re: [R] changing variables in a dataset

2009-05-06 Thread Federman, Douglas
you could use chickwts$feed<- as.numeric(levels(chickwts$feed))[as.integer(chickwts$feed)] I got this by searching archives of old messages. I can't recall why the simpler as.numeric(chickwts$feed) is not an appropriate all around solution. -- "I like nonsense, it wakes up the brain cell

Re: [R] General Question about Graphics

2009-05-06 Thread Dieter Menne
nps.gov> writes: > Basically, I found that including > error bars with barplots is not desirable and hence there appears that > there is no function to do this. > >Can someone offer suggestions on how to do this simple procedure http://markmail.org/message/3f6jaztq2cpezrkl >or offer an alte

[R] Houston, TX Users Group

2009-05-06 Thread Robert Sanford
I'm looking for a Users Group in or near Houston, TX. Many thanks! rjsjr __ 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 comment

[R] Need help building combined model

2009-05-06 Thread E Cell
I have two kind of variables. One kind where the values are continious and ranges from -1 to 5, and the other is boolean (i.e. true or false). For example: V1   V2  V3 V4 V5  V6 0.1  0.4   1    0   -1   3.7 0.4  0.1   2   -1   0    3.7 and V1  V2  V3 0 1    0 0     0    1 I want to mak

[R] changing variables in a dataset

2009-05-06 Thread schung
Hi! I just quasi-learned how to use R and I'm trying to change the feed from horsebean, linseed, etc to 1, 2, 3, etc The dataset I'm practicing on is pre-loaded in R data(chickwts) chickwts Any help is much appreciated!! Thank you!! -- View this message in context: http://www.nabble.com/chan

Re: [R] A question about using “by” in GAM model fitting of interaction between smooth terms and factor

2009-05-06 Thread willow1980
Dear Simon, Thank you so much! Actually, it seems that Crawley's R book adopted the information from that earlier version and he discussed "by" in the context of that version. I will take a practice according to your suggestion. Thanks again! Jianghua Simon Wood-4 wrote: > > The problem here i

[R] General Question about Graphics

2009-05-06 Thread Steve_Friedman
Greetings I have encountered a situation with regards to plotting barcharts with associated error bars. My search for clues on how to accomplish this turned up some interesting information. Basically, I found that including error bars with barplots is not desirable and hence there appears that

Re: [R] smoothing spline in package gam

2009-05-06 Thread willow1980
Sorry, I did not notice you were using GAM package. Most R users are using Simon Wood's MGCV package. I recommend you to use it. I have never used GAM package, so I cannot make further comments. Good luck! 楊 詩韻 wrote: > > > dear all, > > > > i have a little question, but it make me torment

Re: [R] PGF Device

2009-05-06 Thread baptiste auguie
I think the pgfSweave project on R-forge is working on this (as far as i know it currently relies on eps2pgf) http://r-forge.r-project.org/R/?group_id=331 HTH, Baptiste On 6 May 2009, at 15:37, Lasse Bombien wrote: Hi all, I saw a thread from 2007 about the possible implementation of a PG

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread Alain Guillet
Hi, I meant that your problem occured because the levels of mylevels are not ordered whereas tapply uses the ordered levels for printing. If you order them (look under), you can see the results of the tapply has the same order as the levels of myfactor >mydata<-c("IN0020020155","IN0019800021

Re: [R] PGF Device

2009-05-06 Thread Gabor Grothendieck
There is pgfSweave on rforge: http://www.rforge.net/pgfSweave/ On Wed, May 6, 2009 at 10:43 AM, Lasse Bombien wrote: > Thanks, > that's a good idea and I might use it for some purposes. But want I > would like is a complete graphics device, which creates PGF output in > the same way e.g. dev.copy

[R] Age Calculation in years, months and days

2009-05-06 Thread utkarshsinghal
Hi All, Is there any way in R to calculate the difference between two dates in years, months & days. > date1 = as.Date("1993-11-23") > date2 = as.Date("2009-04-15") I want my output to be:15 years 4 months 27 days Any hint would be helpful. Regards Utkarsh [[alternative HTML

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread Bert Gunter
Jim's advice is patently false. Please read ?tapply for correct details. Counterexample: > y <- rnorm(6) > x <- factor(rep(factor(letters[1:3],lev = letters[3:1]),2)) > x [1] a b c a b c Levels: c b a > tapply(y,x,mean) c b a 0.4545897 -1.0544782 0.4682773 Bert G

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread S Ellison
The problem is in the code. When you say >> mysummary<-tapply(myfactor,mydata,length) >> mysummary you have used mydata as a factor and myfactor as the data. tapply has (correctly) used the ordered labels in the grouping factor (mydata) to label its output. If you did what you probably intende

[R] Estimating parameters in a nonlinear model with observations

2009-05-06 Thread mathr
Hi, I have a problem. I want to estimate some parameters in a function. I already have an empirical function (made from 100 observations), which I want to estimate the parameters from. The function is f(x) = 1-((a+1)b^x)/(a+b^x) f(x) in [0,1], x in [0,1]. I want to estimate a and b. I tried to

[R] Need help building combined model

2009-05-06 Thread E Cell
I have two kind of variables. One kind where the values are continious and ranges from -1 to 5, and the other is boolean (i.e. true or false). For example: V1   V2  V3 V4 V5  V6 0.1  0.4   1    0   -1   3.7 0.4  0.1   2   -1   0    3.7 and V1  V2  V3 0 1    0 0     0    1 I want to make

Re: [R] [R-sig-ME] Duplicating meta-regression results from PROC MIXED with lmer

2009-05-06 Thread Brant Inman
Rolf, I actually don't believe that this is a SAS vs R issue since I have 3 sources that report the same results. I know that STATA, SAS and the mima function from R can all be used to give the correct results. The question is related more to how I can get similar results with lmer. Cu

[R] Une glacière campingaz offerte pour vos d éparts en weekend

2009-05-06 Thread Laura de Welcome Office
WELCOME OFFICE n°1 DU DISCOUNT AUX ENTREPRISES Si vous ne visualisez pas correctement ce message, cliquez ici :http://trc1.emv2.com/HM?a=A9X7Cq,jKYmd8XLLjqxobfPiTA Pour être certain de recevoir notre newsletter, nous vous conseillons d'ajouter servicecli...@welcomeoffice.emv1.net à votre carnet

Re: [R] PGF Device

2009-05-06 Thread Lasse Bombien
Thanks, that's a good idea and I might use it for some purposes. But want I would like is a complete graphics device, which creates PGF output in the same way e.g. dev.copy2pdf() would. Lasse Am Mittwoch, den 06.05.2009, 14:15 + schrieb Dieter Menne: > Lasse Bombien phonetik.uni-muenchen.de>

[R] bug with RODBC ?

2009-05-06 Thread JP_RENAUD_(DTCB)
Dear R help, I've attach a dbf file (and my prog. below) from which I did not succeed in geting the right values for my variable "densite"... using RODBC. It returns "10" instead of "100" , without error messages !!! is it a bug with RODBC ? I've succeed in geting the right values using the

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Mike Lawrence
I work in cognitive science where we collect one or more data files per participant in an experiment then merge those files to perform subsequent analyses. Sometimes some files are in wide format and others are in long format, necessitating reshaping. I've found R entirely satisfactory for this.*

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread Chirantan Kundu
Hi Ellison, Thanks for pointing it out. Bad miss on my part. Regards. On Wed, May 6, 2009 at 7:55 PM, S Ellison wrote: > The problem is in the code. > > When you say > >> mysummary<-tapply(myfactor,mydata,length) > >> mysummary > > you have used mydata as a factor and myfactor as the data. >

Re: [R] Summary help

2009-05-06 Thread Dieter Menne
mathallan gmail.com> writes: > Hi, I have fittet a gamma model, and is wondering if I can read the shape and > the scale direct from the summary > >Estimate Std. Errort valuePr(>|t|) > (Intercept) 1.612e+00 4.735e-02 34.052 <2e-16 **

Re: [R] tapply changing order of factor levels?

2009-05-06 Thread Chirantan Kundu
Hi Alain, I tried levels(myfactor) as you suggested. > levels(myfactor) [1] "IN0020020155" "IN0019800021" "IN0020020064" The order is preserved, no alphanumerical sorting done here. Regards. On Wed, May 6, 2009 at 7:35 PM, Alain Guillet wrote: > Hi, > > I don't believe the problem is related t

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Simon Pickett
Thanks Laura, I deal with huge data sets and have to do alot of fancy juggling of data to get the job done in R. I have recently been granted access to a cluster at a university which means 64 bit machines with 8gb of memory, which could prove to be a saviour hopefully. Simon. - O

Re: [R] X and Y axis labels on a barplot

2009-05-06 Thread Steve Murray
Thanks Jim, that's great. Based on the information in the previous messages, is it possible to change the y-axis as I'd hoped? Thanks again, Steve _ [[elided Hotmail spam]] __ R-help@r-

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread Paul Emberson
I also use the approach Philipp describes below. I use Python and shell scripts for processing thousands of input files and getting all the data into one tidy csv table. From that point onwards it's R all the way (often with the reshape package). Paul Philipp Pagel wrote: On Wed, May 06, 2

Re: [R] PGF Device

2009-05-06 Thread Dieter Menne
Lasse Bombien phonetik.uni-muenchen.de> writes: > I saw a thread from 2007 about the possible implementation of a PGF > (http://sourceforge.net/projects/pgf/) graphics device. Does anyone know > if something came of it? I am always using pgf to make drawings together with Sweave. See http://w

Re: [R] Do you use R for data manipulation?

2009-05-06 Thread C.H.
There is a book on data manipulation using R. Data manipulation with R. http://www.springer.com/statistics/computational/book/978-0-387-74730-9 It highlighted how comprehensive the data manipulation capabilities of R can be. Regards, CH On Wed, May 6, 2009 at 10:01 PM, Simon Pickett wrote:

  1   2   >