Re: [R] curvedarrow (some graphics problem)

2009-06-24 Thread casperyc
Hi there, This is now the code % library(grid) vp <- viewport( x = unit(0, "npc"), y = unit(0, "npc"), just = c("left", "bottom"), xscale = c(-1, 1) , yscale = c(-1, 1)) vp2 <- viewport( # probably not needed but I had trouble placing the xaxis x = unit(0,"npc"), y = unit(0.5, "npc"

Re: [R] Using by() and stacking back sub-data frames to one data frame

2009-06-24 Thread Kingsford Jones
try do.call(rbind, yourByList) hth, Kingsford Jones On Wed, Jun 24, 2009 at 9:34 PM, Stephan Lindner wrote: > Dear all, > > > I have a code where I subset a data frame to match entries within > levels of an factor (actually, the full script uses three difference > factors do do that). I'm very

Re: [R] tail probability

2009-06-24 Thread David Winsemius
On Jun 24, 2009, at 8:01 PM, Roslina Zakaria wrote: Hi r-users, If I have 10 data generated from multi skew-t distribution, how do I find the tail probability of alpha=.01? You have given us the tail probability, so I assume you are asking for the the value of x above which the tail

Re: [R] apply on xts

2009-06-24 Thread David Winsemius
On Jun 24, 2009, at 9:26 PM, R_help Help wrote: Hi, I do not understand why after I called apply on a function that returns an xts (getIdvAdjSeries) it returns a matrix whose columns are just numeric value of time series in xts instead of a list of xts objects. Basically, I called the fo

Re: [R] Can hist plot % of count instead of raw count?

2009-06-24 Thread David Winsemius
On Jun 24, 2009, at 9:29 PM, R_help Help wrote: I do not want to use histogram because I have more control over base graphs that R provide. I'm wondering if hist function provides a parameter that can set y axis as % of count instead of raw count? So you want 100 times the proportions t

[R] Lose of decimal when using write.table to text file

2009-06-24 Thread Bob Ly
Good Day, I have the following: >Date<-c("08/05/08","08/06/08","08/07/08") >Weight<-c(209.4,211.8,210.0) >planned.meal<-cbind(Date,Weight) >planned.meal DateWeight 1 08/05/08, 209.4 2 08/06/08, 211.8 3 08/07/08, 210.0 >write.table(planned.meal, file="plannedMeal1.txt", + quote=FA

[R] Using by() and stacking back sub-data frames to one data frame

2009-06-24 Thread Stephan Lindner
Dear all, I have a code where I subset a data frame to match entries within levels of an factor (actually, the full script uses three difference factors do do that). I'm very happy with the precision with which I can work with R, but since I loop over factor levels, and the data frame is big, the

[R] grid.polygon() + color gradient

2009-06-24 Thread Kexin Ji
Hi, I wonder whether there is a way to generate a polygon (a triangle in my case) with color gradient using grid.polygon() in package grid? I tried something like library(grid) grid.polygon(x=c(0, 0.5, 1), y=c(0.5, 1, 0.5), gp=gpar(col=NA, fill=colorRampPalette(c("green", "lightgray"),

[R] Can hist plot % of count instead of raw count?

2009-06-24 Thread R_help Help
I do not want to use histogram because I have more control over base graphs that R provide. I'm wondering if hist function provides a parameter that can set y axis as % of count instead of raw count? If not, I'd like to know how I can add text or line on histogram function? I don't like the idea o

[R] apply on xts

2009-06-24 Thread R_help Help
Hi, I do not understand why after I called apply on a function that returns an xts (getIdvAdjSeries) it returns a matrix whose columns are just numeric value of time series in xts instead of a list of xts objects. Basically, I called the following: apply(matrix(tickers,ncol=1),1,FUN=getDivAdjSer

[R] Announcing new features for the crantastic.org community portal

2009-06-24 Thread Bjørn Arild Mæland
We’re very pleased to announce an update to http://crantastic.org/, the community site for R packages. Notable new features include: * Easier login - you can use your existing account from Google, Twitter, OpenID, Yahoo!, Flickr, or MyOpenID. * Timelines with recent changes * Task View integration

Re: [R] How to avoid ifelse statement converting factor to character

2009-06-24 Thread Rolf Turner
On 25/06/2009, at 12:27 PM, Craig P. Pyrame wrote: Dear Stavros, What you discuss below is somewhat scary to me as an R newbie. Is this just an incident, a bug perhaps, or rather the way things typically go in R, as your "Welcome to R!" seems to suggest? I have just started to learn R

Re: [R] How to avoid ifelse statement converting factor to character

2009-06-24 Thread Craig P. Pyrame
Dear Stavros, What you discuss below is somewhat scary to me as an R newbie. Is this just an incident, a bug perhaps, or rather the way things typically go in R, as your "Welcome to R!" seems to suggest? I have just started to learn R, and my initial euphoria of the "I can do anything with

[R] tail probability

2009-06-24 Thread Roslina Zakaria
Hi r-users, If I have 10 data generated from multi skew-t distribution, how do I find the tail probability of alpha=.01? Thank you. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] Qualified parameters in SOAP body using .SOAP

2009-06-24 Thread Olivier Cailloux
Hi Duncan, Thanks for this useful answer. See below. Duncan Temple Lang a écrit : Hi Olivier Olivier Cailloux wrote: Hello, I am trying to reach a web service using the SOAP package. I succeeded calling the web service, but not sending parameters to it. After much research and tries, I th

[R] List subsetting

2009-06-24 Thread Ivo Shterev
Hello, I have a question about list indexing. Lets say we have a list of 3 lists, each containing 3 different type elements: > a=replicate(3, list(list(c(1,1,1), diag(3), c(2,2,2 > a [[1]] [[1]][[1]] [1] 1 1 1 [[1]][[2]] [,1] [,2] [,3] [1,]100 [2,]010 [3,]0

[R] how to extract the effect size eta in an anova table

2009-06-24 Thread Martin Batholdy
Hi, perhaps the question I have is more a statistical question than a question about R. But I hope nevertheless someone could help me. If I have the following anova table; Analysis of Variance Table Response: aktiv Df Sum Sq Mean Sq F value Pr(>F

Re: [R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Gabor Grothendieck
Perhaps: x <- 1:26 xyplot(x ~ x, groups = x, pch = letters, col = rainbow(26)) On Wed, Jun 24, 2009 at 3:28 PM, Katharina May wrote: > Hi, > > I've got the following problem which I cannot think of a solution right now: > > if got a lattice xyplot in black and white and a grouping variable > wit

Re: [R] Memory issues on a 64-bit debian system (quantreg)

2009-06-24 Thread roger koenker
my earlier comment is probably irrelevant since you are fitting only one qss component and have no other covariates. A word of warning though when you go back to this on your new machine -- you are almost surely going to want to specify a large lambda for the qss component in the rqss call.

Re: [R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Deepayan Sarkar
On Wed, Jun 24, 2009 at 2:05 PM, Katharina May wrote: > That's a point. I justed wanted to provide an overview for myself to > see the tendencies in a direct comparement > and with an easy way to distinct them, but maybe the text panel can > help me with that... > > Well anyway, is it right that a

Re: [R] parallel rotated strips with color gradient

2009-06-24 Thread Paul Murrell
Hi Kexin Ji wrote: Hi, I want to produce two parallel rotated strips with color gradient. So far, the sample strip is something produced by this: pushViewport(viewport(x = unit(0.638, "npc"), y =unit(0.386, "npc"), width=.62, height=0.006, angle=137.2)) grid.rect(y=100:1/100, just="top",

Re: [R] Memory issues on a 64-bit debian system (quantreg)

2009-06-24 Thread Jonathan Greenberg
Yep, its looking like a memory issue -- we have 6GB RAM and 1GB swap -- I did notice that the analysis takes far less memory (and runs) if I: tahoe_rq <- rqss(ltbmu_4_stemsha_30m_exp.img~ltbmu_eto_annual_mm.img,tau=.99,data=boundary_data) (which I assume fits a line to the quantiles) vs. ta

Re: [R] Memory issues on a 64-bit debian system (quantreg)

2009-06-24 Thread Dirk Eddelbuettel
On 24 June 2009 at 14:07, Jonathan Greenberg wrote: | I installed R 2.9.0 from the Debian package manager on our amd64 | system that currently has 6GB of RAM -- my first question is whether | this installation is a true 64-bit installation (should R have access to | > 4GB of RAM?) I suspe

Re: [R] Memory issues on a 64-bit debian system (quantreg)

2009-06-24 Thread roger koenker
Jonathan, Take a look at the output of sessionInfo(), it should say x86-64 if you have a 64bit installation, or at least I think this is the case. Regarding rqss(), my experience is that (usually) memory problems are due to the fact that early on the processing there is a call to model.mat

Re: [R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Charles Annis, P.E.
Perhaps what you do should depend on what you want to see. If all the lines lie near one another that says one thing. If all but one or two "agree" but the mavericks are in obvious disagreement, then that begs to ask "why?" If the entire lot looks like spaghetti, then that is informative also.

Re: [R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Katharina May
That's a point. I justed wanted to provide an overview for myself to see the tendencies in a direct comparement and with an easy way to distinct them, but maybe the text panel can help me with that... Well anyway, is it right that a grouped black and white plot can contain a maxinum of 8 distingui

[R] Memory issues on a 64-bit debian system (quantreg)

2009-06-24 Thread Jonathan Greenberg
Rers: I installed R 2.9.0 from the Debian package manager on our amd64 system that currently has 6GB of RAM -- my first question is whether this installation is a true 64-bit installation (should R have access to > 4GB of RAM?) I suspect so, because I was running an rqss() (package quantr

Re: [R] Help LSD multiple comparison test

2009-06-24 Thread Mendiburu, Felipe (CIP)
Dear Tu, Use library(agricolae) LSD.test(), It is necessary to aov() comparison <- LSD.test(yield,virus,df,MSerror,group=F) Comparison between treatments means tr.i tr.j diff pvalue 112 11.533 0.0176 213 11.933 0.0151 314 12.500 0.0121 423 23.

Re: [R] Reading 4-byte float into R from binary file

2009-06-24 Thread Sean Davis
On Wed, Jun 24, 2009 at 2:55 PM, Duncan Murdoch wrote: > On 6/24/2009 2:41 PM, Sean Davis wrote: > >> A simple question, I hope I have a binary file format that I want to >> slurp into R using readBin. There are a couple of fields in the file that >> are 4-byte floats. Since R has no "float

Re: [R] lmList

2009-06-24 Thread Daniel Malter
As I said, the example works. So for simulated data it works, which means that for correctly provided data, it should work as well. year%in%c(1) means for all years in the vector. In this case, it is identical to year==1. However, the option I use is extendable since you could write year%in%c(1,3,

Re: [R] Weighting column entries in a data frame

2009-06-24 Thread camillus
Thanks! jholtman wrote: > > Try this: > >> fdata > state statenum yearincome popul > 1 ALABAMA11 9.703193 3973 > 2 ALABAMA12 9.745950 3992 > 3 ALABAMA13 9.762092 4015 > 4 ALASKA21 10.221640 532 > 5 ALASKA22 10.16960

Re: [R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Bert Gunter
Don't be silly. They can't be made "distinguishable" by any number of line types and/or colors. The brain can't keep that many different symbol representations straight. Referring back and forth to a legend is also similarly useless. You need to think more creatively about how to make a more meanin

Re: [R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Chuck Cleland
On 6/24/2009 3:28 PM, Katharina May wrote: > Hi, > > I've got the following problem which I cannot think of a solution right now: > > if got a lattice xyplot in black and white and a grouping variable > with many (more than 8 > values) and I plot it as regression lines (type="r"), just like this

[R] distinguish regression lines in grouped, black and white lattice xyplot

2009-06-24 Thread Katharina May
Hi, I've got the following problem which I cannot think of a solution right now: if got a lattice xyplot in black and white and a grouping variable with many (more than 8 values) and I plot it as regression lines (type="r"), just like this one (not reproducable but that's I guess not the point he

Re: [R] Why can't I use ADF.test?

2009-06-24 Thread DongHongwei
Thanks! I tried these, but I got the following messages:Warning message:In getDependencies(pkgs, dependencies, available, lib) : package ‘uroot’ is not available Error in library(uroot) : there is no package called 'uroot' I download a package called "uroot" and put it into: C:\Program F

Re: [R] subplot()

2009-06-24 Thread Greg Snow
The subplot function (at least the one in the TeachingDemos package and the copy in Hmisc) only does rectangles. Clipping regions are also limited to rectangles currently. There are external tools (gimp, imagemagick) that may me of use or triangles and other shapes can be approximated by enoug

Re: [R] agrep behavior

2009-06-24 Thread Eduardo Leoni
Thanks David, for trying to replicate. May be it is a 2.9 problem? I should have attached session info: > agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.distance=.9) integer(0) > agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.distance=.7) [1] 1 sessionInfo() R vers

Re: [R] Why can't I use ADF.test?

2009-06-24 Thread Richardson, Patrick
Since you provided no code, the following is just a guess, Try: install.packages("uroot") library(uroot) Then try your analysis again. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of DongHongwei Sent: Wednesday, June 24, 2009 3:

[R] Why can't I use ADF.test?

2009-06-24 Thread DongHongwei
Greetings! I'm trying to use R to test the unit root for a univariate data. By this link: http://rss.acs.unt.edu/Rdoc/library/uroot/html/ADF.test.html it tells me that I can use the function ADF.test(). However, when I tried this in R, I got this message: "Error: could not find function "ADF.te

Re: [R] How to recursively build a binary tree with R script?

2009-06-24 Thread Duncan Murdoch
On 6/24/2009 2:02 PM, Mike Beddo wrote: Greetings! Can someone provide a simple script for a R function that recursively builds a binary tree. I am most familiar with C and pass by reference, but I think R is like Fortran and pass by value. Here's a tree with a random depth: makeTree <- fu

Re: [R] agrep behavior

2009-06-24 Thread David Winsemius
Unable to reproduce: > agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.distance=.6) [1] 1 > > agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.distance=.89) [1] 1 > agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.distance=.9) [1] 1 > agrep("Sta

Re: [R] Reading 4-byte float into R from binary file

2009-06-24 Thread Duncan Murdoch
On 6/24/2009 2:41 PM, Sean Davis wrote: A simple question, I hope I have a binary file format that I want to slurp into R using readBin. There are a couple of fields in the file that are 4-byte floats. Since R has no "float" data type (4-byte), I am wondering how to go about this task. I

Re: [R] How to avoid ifelse statement converting factor to character

2009-06-24 Thread Stavros Macrakis
On Wed, Jun 24, 2009 at 12:34 PM, Mark Na wrote: > The problem is that after running the ifelse statement, data$SOCIAL_STATUS > is converted from a factor to a character. > Is there some way I can avoid this conversion? I'm afraid that ifelse has very bizarre semantics when the yes and no argument

Re: [R] "by" question

2009-06-24 Thread hadley wickham
You might also want to look at the plyr package, http://had.co.nz/plyr. In particular, ddply + transform makes these tasks very easy. library(plyr) ddply(mtcars, "cyl", transform, pos = seq_along(cyl), mpg_avg = mean(mpg)) Hadley On Wed, Jun 24, 2009 at 11:48 AM, David Hugh-Jones wrote: > That

[R] Reading 4-byte float into R from binary file

2009-06-24 Thread Sean Davis
A simple question, I hope I have a binary file format that I want to slurp into R using readBin. There are a couple of fields in the file that are 4-byte floats. Since R has no "float" data type (4-byte), I am wondering how to go about this task. I could simply do all the work in C, but the

[R] subplot()

2009-06-24 Thread Kexin Ji
Hi, I'm trying to get a color-gradient triangle out of a large plot. Wonder can subplot() generate a triangle? So far, I'm only getting rectangles. Great appreciation for any reply!! Kexin __ R-help@r-project.org mailing list https://stat.ethz.ch/mail

[R] agrep behavior

2009-06-24 Thread Eduardo Leoni
Dear list - I am a bit puzzled by the behavior of agrep: The following command finds a match: agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.distance=.6) But if I _increase_ the maximum distance to .9 it fails: agrep("Staatssekretar im Bundeskanzleramt","Bundeskanzler",max.dist

[R] How to recursively build a binary tree with R script?

2009-06-24 Thread Mike Beddo
Greetings! Can someone provide a simple script for a R function that recursively builds a binary tree. I am most familiar with C and pass by reference, but I think R is like Fortran and pass by value. - Mike Beddo __ R-help@r-project.org mailing list

[R] Goodness of fit test / pseudo r^2 measure for Zero Inflated Model

2009-06-24 Thread lara harrup (IAH-P)
Hi I have been using a Zero-Inflated negative binomial model fitted using the pscl zeroinfl command but I would like to extract a goodness of fit measure are there any suitable pseudo R^2 measures available for this type of analysis to try and assess the amount of variation in the data explain

Re: [R] I meant bwlabel

2009-06-24 Thread Sandor Benczik
aliceduggan wrote: > > Sorry I meant bwlabel on this message > [...] > I am using R-Image in an MSc statistics dissertation and have found, in > various EBImage manuals a functions - bwimage, which I would like to use, > however I can't find it within my version of R. > Could you tell me if the

Re: [R] Qualified parameters in SOAP body using .SOAP

2009-06-24 Thread Duncan Temple Lang
Hi Olivier Olivier Cailloux wrote: Hello, I am trying to reach a web service using the SOAP package. I succeeded calling the web service, but not sending parameters to it. After much research and tries, I think I found that the problem lies in the namespace including the parameters in the S

[R] Coxph frailty model counting process error X matrix deemed singular

2009-06-24 Thread Porter, Aaron T
Hello, I am currently trying to simulate data and analyze it using the frailty option in the coxph function. I am working with recurrent event data, using counting process notation. Occasionally, (about 1 in every 100 simulations) I get the following warning: Error in coxph(Surv(start, end,

Re: [R] Problem installing RODBC package under UBUNTU

2009-06-24 Thread Dirk Eddelbuettel
Luis, On 24 June 2009 at 16:35, Luis Ridao Cruz wrote: | R-help, | | I'm now on the process of installing RODBC on UBUNTU | but an error occured. I copy-paste the output: You can simply do $ sudo apt-get install r-cran-rodbc As for the error: | > install.packages("RODBC") [...] | co

Re: [R] How to avoid ifelse statement converting factor to character

2009-06-24 Thread Bert Gunter
Explicitly convert it to a factor... data$SOCIAL_STATUS<-factor(ifelse(data$SOCIAL_STATUS=="B" & data$MALE>4, "C", data$SOCIAL_STATUS)) However, note that this would, in general, change the levels attribute to the levels actually present in the converted vector. If you wish to (and it makes sense

Re: [R] "by" question

2009-06-24 Thread David Hugh-Jones
That seems to work. I should add that to make "ave" work like "by" one can do: mydata$newvar <- ave(1:nrow(mydata), mydata$some_factor, FUN= function (x) { x <- ds[x,] # ... etc... }) Thanks! David [[alternative HTML version deleted]] __ R-h

Re: [R] How to avoid ifelse statement converting factor to character

2009-06-24 Thread Henrique Dallazuanna
You can work with levels of factor: levels(DF$SOCIAL_STATUS)[DF$MALE > 4 & DF$SOCIAL_STATUS == "B"] <- "C" On Wed, Jun 24, 2009 at 1:34 PM, Mark Na wrote: > Hi R-helpers, > > Please see the below R output. > The problem is that after running the ifelse statement, data$SOCIAL_STATUS > is convert

[R] change the height or scale of the y axis

2009-06-24 Thread legen
Hallo, All, I have a question about changing the height or scale of the y axis. When I use following two R codes, I can get two plots. Please look at the y axes, the number of indices (x1, x2, …) on the y axis in the first plot is smaller than that in the second plot, and hence the space between

[R] Problem installing RODBC package under UBUNTU

2009-06-24 Thread Luis Ridao Cruz
R-help, I'm now on the process of installing RODBC on UBUNTU but an error occured. I copy-paste the output: > install.packages("RODBC") Warning in install.packages("RODBC") : argument 'lib' is missing: using '/home/luisridaocruz/R/x86_64-pc-linux-gnu-library/2.8' trying URL 'http://cran.ii.uib

Re: [R] lmList

2009-06-24 Thread Daniel Malter
Cecilia, this is impossible to tell from the information you provide. The simulated data below... ##START year=rep(1:10,10) year.fe=rep(rgamma(10,10,2),10) firm.fe=rep(rnorm(10,0,3),each=10) x=rnorm(100,0,3) e=rnorm(100,0,3) y=10+firm.fe+year.fe+x+e newdata=data.frame(y,x,e,firm,year,firm.fe,year.

[R] How to avoid ifelse statement converting factor to character

2009-06-24 Thread Mark Na
Hi R-helpers, Please see the below R output. The problem is that after running the ifelse statement, data$SOCIAL_STATUS is converted from a factor to a character. Is there some way I can avoid this conversion? Thanks in advance, Mark Na > str(data) 'data.frame': 2100 obs. of 11 variables: $ D

Re: [R] [Classification] lifting score in R

2009-06-24 Thread Michael
Thanks a lot! Yet is there a way to incorporate the lifting score into Cross Validation, not just a plot? Thanks again! On Wed, Jun 24, 2009 at 9:07 AM, Tobias Sing wrote: > Michael, > > a lift chart for evaluating binary scoring classifiers, as I > understand it, plots... > > lift score: P(Yhat

Re: [R] how to undo automatic loading of packages?

2009-06-24 Thread davidr
I removed all of the objects that were from the examples I tried, saved, and quit. R starts up cleanly now. Yeah! That was annoying behavior, and I would recommend that the authors change it, please. Thank you for your to-the-point advice, Professor Ripley! -- David ps - Sorry for the lengthy dis

Re: [R] "by" question

2009-06-24 Thread jim holtman
How about something like this: > x id data 1 1 0.7773207 2 3 0.9606180 3 2 0.4346595 4 3 0.7125147 5 2 0.344 6 2 0.3253522 7 2 0.7570871 8 3 0.2026923 9 3 0.7111212 10 2 0.1216919 > # compute running sum for each ID > x$run <- ave(x$data, x$id, FUN=cumsum) > x id

Re: [R] how to undo automatic loading of packages?

2009-06-24 Thread Prof Brian Ripley
That was unintentional: the mail server crashed and apparently sent the just-started reply. It is nothing to do with 'Autoloads'. What is most likely if that you have saved a reference to a namespace such as 'distrMod' in your .RData file. If that it is the case, when .RData is loaded it wil

[R] "by" question

2009-06-24 Thread David Hugh-Jones
Hello all I have a big data frame and I regularly want to break it down into subsets, calculate some new data, and add it back to the data frame. At the moment my technique seems a bit ugly and embarrassing. Something like: result <- by(mydata, mydata$some_factor, function (x) { # do something

Re: [R] [Classification] lifting score in R

2009-06-24 Thread Tobias Sing
Michael, a lift chart for evaluating binary scoring classifiers, as I understand it, plots... lift score: P(Yhat = + | Y = +)/P(Yhat = +) against rate of rate of positive predictions: P(Yhat = +). ...across the continuum of possible cutoffs. If you want to do this, here is how you would do this

[R] Random Forest Variable Importance Interpretation

2009-06-24 Thread lara harrup (IAH-P)
Hi I am trying to explore the use of random forests for regression to identify the important environmental/microclimate variables involved in predicting the abundance of a species in different habitats, there are approx 40 variable and between 200 and 500 data points depending on the dataset. I

Re: [R] [Classification] lifting score in R

2009-06-24 Thread Christian Schulz
Maybe the packages caret,RWeka and ROCR are usefuel starting points. Cheers, Christian Hi all, Could anybody give me some pointers to Cross Validation using Lifting Score as error function, as commonly used in data-mining and classification field in marketing and e-commerce research? Thanks!

Re: [R] how to undo automatic loading of packages?

2009-06-24 Thread Prof Brian Ripley
On Wed, 24 Jun 2009, dav...@rhotrading.com wrote: I wanted to try out package distrMod, so I did install.packages('distrMod') library(distrMod) and played around, saved and quit. Now whenever I start up in this directory, I get distr and lots of other stuff loaded and lots of messages. How

Re: [R] subsetting data frame using a vector of column names / values

2009-06-24 Thread Blazej Krzeminski
This "one liner" works great! Thanks (for all replies) > > Try this: > > subset(d, eval(parse(text = paste(paste(columns, values, sep = "=="), > collapse = " & " > >> >> Hello >> >> I have a data frame d with columns "var1", "var2", "var3" >> >> Then I have two vectors: >> columns <- c("var2

Re: [R] The gradient of a multivariate normal density with respecttoits parameters

2009-06-24 Thread Ravi Varadhan
Karl, I have written a function to compute the gradient of a multivariate normal density (derivatives at a given point, with respect to the parameters of the density). It is in the atttached file. I would appreciate any feedback. There are couple of interesting points: 1. Note is that there

[R] building R packages

2009-06-24 Thread Stein, Luba (AIM SE)
Hello, I tried to build an own R package on Windows XP but get an error which I can't solve. I called my package "pack". It works to creat the file "pack" with package.skeleton(). But when I try to compile it with Rcmd build --binary pack I obtain the following error: IO::Seekable::seek missi

[R] how to undo automatic loading of packages?

2009-06-24 Thread davidr
I wanted to try out package distrMod, so I did > install.packages('distrMod') > library(distrMod) and played around, saved and quit. Now whenever I start up in this directory, I get distr and lots of other stuff loaded and lots of messages. How do I keep it from automatically loading, other tha

Re: [R] Boxplots: side-by-side

2009-06-24 Thread Richard M. Heiberger
Try this Rich tmp <- data.frame( y=rnorm(100), category=rep(factor(letters[1:5]),each=20), level=rep(factor(0:1), length=100)) tmp table(tmp[,2:3]) tmp$y[with(tmp, category=="a" & level=0)] <- NA tmp$y[with(tmp, category=="a" & level==0)] <- NA tmp$y[with(tmp, category=="e" & level==1)] <- NA t

[R] [Classification] lifting score in R

2009-06-24 Thread Michael
Hi all, Could anybody give me some pointers to Cross Validation using Lifting Score as error function, as commonly used in data-mining and classification field in marketing and e-commerce research? Thanks! __ R-help@r-project.org mailing list https://s

Re: [R] rgdal package -- Error in installing package

2009-06-24 Thread B. H. Braswell
$ sudo R > install.packages(rgdal) worked for me on my Ubuntu machine but, I already had GDAL library installed with $ sudo apt-get install libgdal1-1.5.0 -- B. H. Braswell (Rob) University of New Hampshire On Jun 24, 2009, at 9:24 AM, Luis Ridao Cruz wrote: R-help, I'm trying to install

Re: [R] order by decerasing 1st variable and increasing 2nd variable

2009-06-24 Thread Ronggui Huang
How about this: > x[order(x$One,-x$Two,decreasing=T),] One Two 8 5 3 7 4 3 6 3 3 4 2 2 5 2 3 3 1 1 1 1 2 2 1 3 2009/6/24 Daniel Brewer : > Hello, > > I have a data.frame which I would like to sort with the primary key > decreasing while the secondry key is increa

[R] Qualified parameters in SOAP body using .SOAP

2009-06-24 Thread Olivier Cailloux
Hello, I am trying to reach a web service using the SOAP package. I succeeded calling the web service, but not sending parameters to it. After much research and tries, I think I found that the problem lies in the namespace including the parameters in the SOAP body. In short, my question is:

[R] order by decerasing 1st variable and increasing 2nd variable

2009-06-24 Thread Daniel Brewer
Hello, I have a data.frame which I would like to sort with the primary key decreasing while the secondry key is increasing e.g. x <- data.frame(One=c(1,1,1,2,2,3,4,5),Two=c(2,3,1,2,3,3,3,3)) I would like to order it so it looks like this: One Two 8 5 3 7 4 3 6 3 3 4 2 2 5 2

Re: [R] Boxplots: side-by-side

2009-06-24 Thread stephen sefick
reproducible code. On Wed, Jun 24, 2009 at 8:53 AM, Santosh wrote: > Dear R-sians.. > > I am trying to plot boxplots with side-by-side option.. I tried some of the > posted suggestions and could not make it work due to unequal sizes of > categories... > > e.g. > weekly measured water depth values

[R] rgdal package -- Error in installing package

2009-06-24 Thread Luis Ridao Cruz
R-help, I'm trying to install the rgdal package under Ubuntu but I get the following warning: > install.packages("rgdal") Warning in install.packages("rgdal", configure.args = "--with-gdal-modules=/usr/local/lib") : argument 'lib' is missing: using '/home/luisridaocruz/R/x86_64-pc-linux-gnu-

[R] Second LondonR Group meeting

2009-06-24 Thread Francisco Gochez
Hello, Mango is pleased to announce that the next LondonR Group meeting will be held on 21st July. At this meeting we plan to have a feedback session from people who attended useR! in Rennes. To help us plan this, if you are attending at Rennes next month and would be interested in giving some

Re: [R] How to import timestamps from emails into R

2009-06-24 Thread Gabor Grothendieck
See the example in plot.zoo labelled Fancy X Axis: library(zoo) example(plot.zoo) ?plot.zoo On Wed, Jun 24, 2009 at 10:11 AM, Thomas Levine wrote: > One last tiny problem: How do I add months to the scale? It currently just > has years > http://school.thomaslevine.org/mywall.png > > Thanks again

Re: [R] driver file

2009-06-24 Thread John Kane
Do you mean something like source? Type ?source for help --- On Tue, 6/23/09, Derek Lacoursiere wrote: > From: Derek Lacoursiere > Subject: [R] driver file > To: r-help@r-project.org > Received: Tuesday, June 23, 2009, 3:05 PM > > Hi, > > How can I, from a single "driver" file, source othe

Re: [R] curvedarrow (some graphics problem)

2009-06-24 Thread David Winsemius
I get: > unit(-1, "line") Error in valid.units(units) : Invalid unit > unit(-1, "lines") [1] -1lines I have an older version of R (2.8.1) and of grid (2.8.1). The source for grid 2.8.1 does not have pseudonyms. http://svn.r-project.org/R/branches/R-2-8-branch/src/library/grid/src/unit.c -- Da

Re: [R] How to import timestamps from emails into R

2009-06-24 Thread Thomas Levine
One last tiny problem: How do I add months to the scale? It currently just has years http://school.thomaslevine.org/mywall.png Thanks again Tom On Sat, Jun 20, 2009 at 12:14 PM, Thomas Levine wrote: > I wasn't really thinking that far ahead; plot tries to do something, so I > figured I'd try th

[R] Boxplots: side-by-side

2009-06-24 Thread Santosh
Dear R-sians.. I am trying to plot boxplots with side-by-side option.. I tried some of the posted suggestions and could not make it work due to unequal sizes of categories... e.g. weekly measured water depth values are categorized into 5 levels based on their values such measurement is again cate

Re: [R] curvedarrow (some graphics problem)

2009-06-24 Thread baptiste auguie
You're right, I meant to write "lines"not "line". The strange thing is, although "line" isn't listed in ?unit, it doesn't return an error on my machine, > unit(-1, "line") [1] -1line > unit(-1, "lines") [1] -1lines Reading from http://svn.r-project.org/R/trunk/src/library/grid/src/unit.c "l

Re: [R] label sorting x-axis

2009-06-24 Thread Henrique Dallazuanna
Try this: dotplot(value ~ factor(le, levels = le),data=df) On Wed, Jun 24, 2009 at 10:24 AM, Christian Schulz wrote: > Thanks, how is it possible that the x-axis labels getting the row sorting > instead the alphabetically one? > Could i just printed only every n (i.e. 3rd) label? > > Christi

[R] label sorting x-axis

2009-06-24 Thread Christian Schulz
Thanks, how is it possible that the x-axis labels getting the row sorting instead the alphabetically one? Could i just printed only every n (i.e. 3rd) label? Christian df <- data.frame(value=runif(26),le=letters) df <- df[order(df[,1]),] dotplot(value ~ le,data=df) Maybe you want to have

[R] parallel rotated strips with color gradient

2009-06-24 Thread Kexin Ji
Hi, I want to produce two parallel rotated strips with color gradient. So far, the sample strip is something produced by this: pushViewport(viewport(x = unit(0.638, "npc"), y =unit(0.386, "npc"), width=.62, height=0.006, angle=137.2)) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA

[R] Odp: subsetting data frame using a vector of column names / values

2009-06-24 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 24.06.2009 14:16:15: > Hello > > I have a data frame d with columns "var1", "var2", "var3" > > Then I have two vectors: > columns <- c("var2", "var3") > values <- c(0, 1) > > > Is there a compact way to subset the data frame > using these two vectors

Re: [R] bwimage

2009-06-24 Thread Gregoire Pau
Dear Alice, EBImage is a general-purpose image processing package for R, able to read, write, process and analyze images, but is part of the Bioconductor project. Please post your future questions on the BioC mailing list (see http://www.bioconductor.org/docs/mailList.html). There is no func

[R] Test for Temporal autocorrelation in GPS obtained points

2009-06-24 Thread Paulo E. Cardoso
Hi, I have data collected from PTT-GPS devices tagged to birds. These data typically are delivery in time slots, comprising the day-light period for example. I'm interested in testing the temporal correlation of observations (points) and eventually exclude locations falling below a given corre

Re: [R] subsetting data frame using a vector of column names / values

2009-06-24 Thread Henrique Dallazuanna
Try this: subset(d, eval(parse(text = paste(paste(columns, values, sep = "=="), collapse = " & " On Wed, Jun 24, 2009 at 9:16 AM, Blazej Krzeminski wrote: > Hello > > I have a data frame d with columns "var1", "var2", "var3" > > Then I have two vectors: > columns <- c("var2", "var3") > valu

Re: [R] Using a variable for mysql/database Query

2009-06-24 Thread jorgusch
Hello, Thanks! Join is not possible, as the database is simply way to large. When we exactly now, what we are looking for maybe, but not yet… By now, I figured the paste command - not familiar with R…, however, it only seems to work for one - the last - entry I am using. Unfortunately, the help

[R] I meant bwlabel

2009-06-24 Thread aliceduggan
Sorry I meant bwlabel on this message Alice --- On Wed, 24/6/09, alicedug...@btopenworld.com wrote: From: alicedug...@btopenworld.com Subject: bwimage To: r-help@r-project.org Date: Wednesday, 24 June, 2009, 12:34 PM Dear Sir/Madam, I am using R-Image in an MSc statistics dissertation

[R] bwlabel

2009-06-24 Thread alicemsc
I am using R-Image in an MSc statistics dissertation and have found, in various EBImage manuals a functions - bwlabel, which I would like to use, however I can't find it within my version of R. Could you tell me if the function has changed or what I need to do to be able to use it. -- View this

[R] lda.cv help

2009-06-24 Thread Oludare Ariyo
i am a new user of R working on "Cost sensitivity for Classical classification functions" i have codes for cross validation for both linear and quadratic classifier but i cant not very cost of missclassification. please any body with help should help me thanks         ARIYO,OLUDARE SAMUEL Statis

[R] bwimage

2009-06-24 Thread aliceduggan
Dear Sir/Madam, I am using R-Image in an MSc statistics dissertation and have found, in various EBImage manuals a functions - bwimage, which I would like to use, however I can't find it within my version of R. Could you tell me if the function has changed or what I need to do to be able to use i

  1   2   >