Re: [R] How to extract sublist from a list?

2011-08-03 Thread Ashim Kapoor
Dear All, How would we do this problem looping over seq(1:2) ? Thank you, Ashim On Thu, Aug 4, 2011 at 10:59 AM, Richard Ma wrote: > Thank you so much GlenB! > > I got it done using your method. > > I'm just curious how did you get this idea? Cause for me, this looks so > tricky > > Cheers

Re: [R] Possible bug of QR decomposition in package Matrix

2011-08-03 Thread Joshua Wiley
Hi C6 (were C1 - 5 already taken in your family?), I downloaded your data and can replicate your problem. R ceases responding and terminates. This does not occur with all uses of qr on a dgCMatrix object. I know nothing about sparse matrices, but if you believe this should not be occurring, you

[R] Rdconv LaTeX files

2011-08-03 Thread Michael O'Keeffe
Hi, I've written a package and converted my Rd files into LaTeX using Rdconv. When I copy and paste these files in to my Sweave document I get the error message when compiling the Sweave file: ! Undefined control sequence. l.32 \inputencoding {utf8} I also get the error message

Re: [R] How to extract sublist from a list?

2011-08-03 Thread Richard Ma
Thank you so much GlenB! I got it done using your method. I'm just curious how did you get this idea? Cause for me, this looks so tricky Cheers, Richard - I'm a PhD student interested in Remote Sensing and R Programming. -- View this message in context: http://r.789695.n4.nabble.com/H

Re: [R] Error message for MCC

2011-08-03 Thread Florent D.
You defined temp as a vector: > temp <- vector(mode="numeric", length = vl) but you try to extract from it as if it was a 2d object: colA <- temp[,compareA] Maybe you meant to use temp1 instead? More meaningful variable names might help avoid such mistakes. On Wed, Aug 3, 2011 at 6:14 PM, Matt

[R] Question about contrasts and interpreting glm output for factors

2011-08-03 Thread dhinds
I'm fitting a logistic regression model of the form: outcome ~ covariates + A*B where A and B are factors -- A has 4 levels, B has 2 levels. The A and B term each have significant main effects and the interaction term is significant. I'd like to ask, how does a particular set of A and B value

[R] persp()

2011-08-03 Thread Rosario Garcia Gil
Hello I am trying to draw a basic black and white map of two European countries. After searching some key words in google and reading many pages I arrived to the conclusion that persp() could be used to draw that map. I have prepared three small example files, which are supposed to be the files

[R] How to extract sublist from a list?

2011-08-03 Thread richard.ma
Hi everyone, Suppose I have a list named "lst", see below: > lst $sub1 ... $sub1$x ... $sub1$y $sub2 ... $sub2$x ... $sub2$y … $sub3 ... ... ... Now, I want to extract the sub-sublist $y from every sublist(sub1, sub2...) and then storage them to a new list. I know how to extract them by s

Re: [R] grImport symbols

2011-08-03 Thread Paul Murrell
Hi baptiste auguie wrote: Dear list, I have two questions regarding grid.symbols() in the grImport package. This package allows you to import a vector graphic in R, and grid.symbols() can be used to plot the resulting glyph at arbitrary locations in a grid viewport. I have tried the code in th

[R] labelling a stacked barchart (lattice)

2011-08-03 Thread M/K Zodet
All: Below is my code for creating a basic horizontal, stacked barchart. I'd like to label the plot in two ways: 1) place the x values in each piece and 2) place the y values above each piece (angled). I'm currently using lattice, but I'm open to suggestions using ggplot2. Questions: 1. C

Re: [R] R CMD check thinks my function is an S3 method

2011-08-03 Thread Prof Brian Ripley
On Wed, 3 Aug 2011, Peter Langfelder wrote: Hi all, in my package I have a function with name plot.cor (this function is inherited from another legacy package). According to CRAN package checks reports, the check apparently thinks plot.cor is a method for the plot generic (I hope I'm using the

Re: [R] Error message for MCC

2011-08-03 Thread Jim Holtman
'temp' is only a vector and you are trying to reference it as a matrix, therefore the error message Sent from my iPad On Aug 3, 2011, at 18:14, Matt Curcio wrote: > Greetings all, > I am getting an error message that is stifling me. > Any ideas? > >> ## Define Directories ## >> load_from <- "

Re: [R] How to make a nomogam and Calibration plot

2011-08-03 Thread Frank Harrell
I want to add a comment related to the calibration plot that was presented in a previous post (which probably cannot be done optimally in SPSS). The plot lacks sufficient resolution in the x-axis values that are calibrated. It is far better to use loess to estimate a smooth nonparametric calibrat

[R] Tinn-R problem: unable to send code to R

2011-08-03 Thread Richard Valliant
The problem mentioned in the 06 Dec 2010 email below still occurs with Tinn-R (v.2.3.7.1) when highlighting a string of code, copying to the clipboard, and trying to send to Rgui via Shift+Ctrl+Q. I can copy 1 line of code to the clipboard and send it to Rgui with Shift+CTRL+Q. This fails with 2

[R] Possible bug of QR decomposition in package Matrix

2011-08-03 Thread C6H5NO2
Hello R users, I am trying to give the QR decomposition for a large sparse matrix in the format of dgCMatrix. When I run qr function for this matrix, the R session simply stops and exits to the shell. The matrix is of size 108595x108595, and it has 4866885 non-zeros. I did the experiment on window

Re: [R] How to make a nomogam and Calibration plot

2011-08-03 Thread zhu yao
Nomogram is user-friendly, but the equation is also acceptable. It should be kept in mind that the process of model development really counts. BTW: You can calculate C-index (AUC) in SPSS. Calibration plot can also be plotted (may be manually) from the result of SPSS. *Yao Zhu* *Department of Uro

[R] Error message for MCC

2011-08-03 Thread Matt Curcio
Greetings all, I am getting an error message that is stifling me. Any ideas? > ## Define Directories ## > load_from <- "/home/mcc/Dropbox/abrodsky/kegg_combine_data/" > save_to <- "/home/mcc/Dropbox/abrodsky/ttest_results/" > > ### > ## Define Columns To Compare ## > co

Re: [R] General indexing in multidimensional arrays

2011-08-03 Thread R. Michael Weylandt
> This might be a little late: but how about this (slightly clumsy) function: > > putValues <- function(Insert, Destination, Location) { > Location = as.matrix(Location) > Location = array(Location,dim(Destination)) > Destination[Location] <- Insert > return(Destination) > } > > It

Re: [R] 3D Bar Graphs in ggplot2?

2011-08-03 Thread baptiste auguie
A barplot rendered with povray, http://zoonek2.free.fr/UNIX/48_R/03.html#10 At the other end of the spectrum, library(txtplot) x <- factor(c("orange", "orange", "red", "green", "green", "red", "yellow", "purple", "purple", "orange")) o <- capture.output(txtbarchart(x)) library(

[R] Trouble reading Illumina Bead Studio Ouput file

2011-08-03 Thread Gouri
Hello All, I am trying to run normalization on the Illumina bead studio output file version 1.5.1.3 using the lumi package. Sine the original file is a huge file I am splitting it and reading it as a batch in the lumi package. This is where the problem begins.. it just seems to be not reading it..

Re: [R] General indexing in multidimensional arrays

2011-08-03 Thread Jannis
Thanks for all the replies!Unfortunately the solutions only work for extracting subsets of the data (which was exactly what I was asking for) and not to replace subsets with other values. I used them, however, to program a rather akward function to do that. Seems I found one of the few aspects

[R] Need help with xyplot

2011-08-03 Thread aziz4
Consider I have the following data: AgeRangeAgeOfPerson PersonNoFriendsAtYear0 FriendsAtYear1 FriendsAtYear2 FriendsAtYear3 FriendsAtYear4 FriendsAtYear5 10 - 12 11 1 0 1 2 2 3 3 10 - 12 12 2 0 1 2 2

Re: [R] Writing a summary file in R

2011-08-03 Thread a217
Just a very simple follow-up. In the summary table (listed as "summ" below), the "TR" column I would like to display the total number of rows (i.e. counts) which I have done via "NROW()" function. However, in the "RG1" I would only like to count the number of rows with a 'totalread' count >= 1 (i.

[R] R CMD check thinks my function is an S3 method

2011-08-03 Thread Peter Langfelder
Hi all, in my package I have a function with name plot.cor (this function is inherited from another legacy package). According to CRAN package checks reports, the check apparently thinks plot.cor is a method for the plot generic (I hope I'm using the correct terminology). checking Rd \usage secti

Re: [R] r-help

2011-08-03 Thread jim holtman
Some sample data would be useful. If you want to add more lines to a plot, the use 'lines' plot(fun1,) lines(fun2, lines(fun3, On Wed, Aug 3, 2011 at 11:21 AM, KnifeBoot wrote: >  Hey, >    Is there any function plotting several "implicit functions" (F(x,y)=0) on > the same fig.

Re: [R] R.app installer probs on Snow Leopard

2011-08-03 Thread David Winsemius
Did you install R first? R.app is just a GUI around the actual R code that could run without any assistance in a terminal session. Generally one installs both R and R.app from the "super-bundle". Since you provided no details of which .pkg files were chosen we are left guessing. (And th

Re: [R] R.app installer probs on Snow Leopard

2011-08-03 Thread peter dalgaard
On Aug 3, 2011, at 18:35 , Walter Ludwick wrote: > Have tried to install R.app several times (6, in fact: versions 2.12, 13 & > 14, both 32 and 64 bit versions), using packages freshly downloaded from the > official project page, and failed every time, given exception reports such as > the fol

Re: [R] limits on liniar model

2011-08-03 Thread John Sorkin
It is hard to prove a negative, but to the best of my knowledge lm will not do what you want. This does not mean there is not a function that will perform your analyses; the sort of thing you want to do is often accomplished using non-linear methods. John >>> ראובן אברמוביץ 8/3/2011 12:00:04 P

Re: [R] Convert matrix to numeric

2011-08-03 Thread David Winsemius
Here's what you _should_ do 1) transpose 2a) as.data.frame 3a) fix the stupid default stringsAsFactor behavior 4a) convert the first 5 columns to numeric dfrm <- as.data.frame( t( structure(.) ) ) dfrm[, 1:5] <-lapply(dfrm[, 1:5], as.character) dfrm[, 1:5] <-lapply(dfrm[, 1:5], as.numeric) Or:

Re: [R] gstat error

2011-08-03 Thread Dennis Murphy
To add to David's comments (nice catch, BTW), I found three variogram() functions as a result of ??variogram. The one that gets used is from the package that is highest in the search path (notice that gstat is 55th (!!)) - that would be the one from the spatial package. [The other is in the Spatial

Re: [R] the significance of BEKK estimation

2011-08-03 Thread zoe_zhang
Here is one more question, How could I input an asymmetry in volatility speci cation in the BEKK function? As far as I know, the BEKK estimation function is mvBEKK.est(eps, order = c(1,1), params = NULL, fixed = NULL, method = "BFGS", verbose = F) I totally have no idea to exert an asymmetry int

[R] the significance of BEKK estimation

2011-08-03 Thread zoe_zhang
Dear ALL, I use BEKK package to estimate Bivariate GARCH model. But when the results come out, there's no t-stat or p-value of the estimated coeffients. Does anyone know how to get the significance? Followings are the codes I input, >P1=data.frame(x,y) >y1=mvBEKK.est(P1) >mvBEKK.diag(y1) Anyhel

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread David Winsemius
On Aug 3, 2011, at 3:05 PM, Ken wrote: Sorry about the lack of code, but using Davids example, would: tapply(itemPrice, INDEX=orderID, FUN=sum) work? Doesn't do the cumulative sums or the assignment into column of the same data.frame. That's why I used ave, because it keeps the sequence c

Re: [R] Convert matrix to numeric

2011-08-03 Thread Nordlund, Dan (DSHS/RDA)
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Ken > Sent: Wednesday, August 03, 2011 12:13 PM > To: Jeffrey Joh > Cc: > Subject: Re: [R] Convert matrix to numeric > > How about > Matrix[1:5,]=as.numeric(Matrix[1:5,]) > -Ken

Re: [R] Convert matrix to numeric

2011-08-03 Thread Sarah Goslee
Hi Jeffrey, On Wed, Aug 3, 2011 at 3:04 PM, Jeffrey Joh wrote: > > I have a matrix that looks like this: > > > structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", > "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", > "1", "719", "18", "OPEN", "DEPR", "0.066534209669

Re: [R] limits on liniar model

2011-08-03 Thread Bert Gunter
Please use R's search capabilities before posting. RSiteSearch("Linear Model with Constraints") appears to give you what you're looking for. Incidentally, with constraints, the model is no longer linear, I believe. -- Bert 2011/8/3 ראובן אברמוביץ : > >   Can I put limits on the lm() command? I

Re: [R] implicit functions (was r-help)

2011-08-03 Thread Duncan Murdoch
On 03/08/2011 11:21 AM, KnifeBoot wrote: Hey, Is there any function plotting several "implicit functions" (F(x,y)=0) on the same fig. Is there anyone who has an example code of how to do this? The contour3d function in the misc3d package only work with the functions with three

Re: [R] Convert matrix to numeric

2011-08-03 Thread Ken
How about Matrix[1:5,]=as.numeric(Matrix[1:5,]) -Ken Hutchison On Aug 3, 2554 BE, at 3:04 PM, Jeffrey Joh wrote: > > I have a matrix that looks like this: > > > structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", > "18", "OPEN", "DEPR", "0.0404073656092023", "0.11518604470459

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread Ken
Hello, Perhaps transpose the table attach(as.data.frame(t(data))) and use ColSums() function with order id as header. -Ken Hutchison On Aug 3, 2554 BE, at 1:12 PM, David Winsemius wrote: > > On Aug 3, 2011, at 12:20 PM, jim holtman wrote: > >> This takes about 2 secs for 1M ro

[R] R.app installer probs on Snow Leopard

2011-08-03 Thread Walter Ludwick
Have tried to install R.app several times (6, in fact: versions 2.12, 13 & 14, both 32 and 64 bit versions), using packages freshly downloaded from the official project page, and failed every time, given exception reports such as the following (appended below, the 2 reports arising out of my 1st

Re: [R] Convert matrix to numeric

2011-08-03 Thread Duncan Murdoch
On 03/08/2011 3:04 PM, Jeffrey Joh wrote: I have a matrix that looks like this: structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", "1", "719", "18", "OPEN", "DEPR", "0.0665342096693433", "0.197570061769498", "1",

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread Ken
Sorry about the lack of code, but using Davids example, would: tapply(itemPrice, INDEX=orderID, FUN=sum) work? -Ken Hutchison On Aug 3, 2554 BE, at 2:09 PM, David Winsemius wrote: > > On Aug 3, 2011, at 2:01 PM, Ken wrote: > >> Hello, >> Perhaps transpose the table attach(as.data.frame(t(dat

[R] Model selection

2011-08-03 Thread xy
Dear List, I have some difficulties to work with the function lmer from lme4. My responses are binary form and i want to use forward selection to my 12 covariates but i dont know how can I choose them based on deviance. Can someone pls give me a example so i can apply. For example my covariates

[R] Help Needed in attempting to install 64-bit R!

2011-08-03 Thread Nynese Tinsley
Hello R Help, I am attempting to install/build a 64-bit version of R to hopefully resolve some memory.limit problems for a user who is running a simulation. The 'configure' runs fine and the compilation (make) runs fine until the very last part (see below). I have libiconv in /usr/local/lib (n

Re: [R] gstat error

2011-08-03 Thread David Winsemius
I see a 'variogram' function in both spatial and gstat when I use ?? variogram on my machine that probably does not have even all of those packages installed. Are you sure they are the same (I looked they are not) or failing that that the one you expect is being chosen? And are you eve

[R] How to fit model in function using passed-in formula, then predict from another function

2011-08-03 Thread Jason Roberts
Hello R experts, I am trying to fit an lme model within a function, using a formula that I passed into the function, and then predict that model from a different function. Could you please advise me on how to do this? The following code illustrates the essence of what I'm trying to do. The actu

Re: [R] R-help Digest, Vol 102, Issue 3

2011-08-03 Thread Uwe Ligges
Since we got this the x-th time now: Dear Fränzi Korner, please please please never ever add auto-replies to your account that also reply to mailing list messages! Thousands of readers of R-help get your auto reply everey day now! Best, Uwe Ligges On 03.08.2011 12:11, fraenzi.kor...@oiko

Re: [R] R CMD check problem

2011-08-03 Thread Baidya Nath Mandal
Many many thanks, working now. Best, BN Mandal On Wed, Aug 3, 2011 at 10:34 PM, Duncan Murdoch wrote: > On 03/08/2011 12:47 PM, Baidya Nath Mandal wrote: > >> Dear Murdoch, >> >> After setting CYGWIN=nodosfilewarning, i re-ran the R CMD check and got >> following message: >> >> * installing *sou

[R] r-help

2011-08-03 Thread KnifeBoot
Hey, Is there any function plotting several "implicit functions" (F(x,y)=0) on the same fig. Is there anyone who has an example code of how to do this? The contour3d function in the misc3d package only work with the functions with three dimensions. Thanks a lot. Many thanks

Re: [R] R CMD check problem

2011-08-03 Thread Baidya Nath Mandal
Dear Murdoch, After setting CYGWIN=nodosfilewarning, i re-ran the R CMD check and got following message: * installing *source* package 'mypackage' ... ** libs ERROR: compilation failed for package 'mypackage' * removing 'C:/Rpackages/mypackage.Rcheck/mypackage' The log file contained following.

[R] Case-by-case tolerance needed for successful integrate()

2011-08-03 Thread Delphine Pessoa
Hello, We are trying to use R to simulate a model based on parameters 'a' and 'b'. This involves the following integration: model<-function(s,x,a,b)(exp(-s*x*10^-5.5)*(s^(a-1)*(1-s)^(b-1))) g<- function(x,a,b){ out<-c() for (i in 1:length(x)){ out[i]<-1- (integrate(model,0,1,x[i]

[R] Convert matrix to numeric

2011-08-03 Thread Jeffrey Joh
I have a matrix that looks like this: structure(c("0.0376673981759913", "0.111066500741386", "1", "1103", "18", "OPEN", "DEPR", "0.0404073656092023", "0.115186044704599", "1", "719", "18", "OPEN", "DEPR", "0.0665342096693433", "0.197570061769498", "1", "1103", "18", "OPEN", "DEPR", "0.1192871

[R] limits on liniar model

2011-08-03 Thread ראובן אברמוביץ
Can I put limits on the lm() command? I only know that you can choose a liniar model with or without an intercept, but can I put other limits on the coefficients (for example- the intercept must be bigger than 1) ? _

Re: [R] gstat error

2011-08-03 Thread gbrenes
Here is my sessionInfo() > sessionInfo() R version 2.12.2 (2011-02-25) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 att

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread David Winsemius
On Aug 3, 2011, at 2:01 PM, Ken wrote: Hello, Perhaps transpose the table attach(as.data.frame(t(data))) and use ColSums() function with order id as header. -Ken Hutchison Got any code? The OP offered a reproducible example, after all. -- David. On Aug 3, 2554 BE, at 1:12

Re: [R] Coefficient names when using lm() with contrasts

2011-08-03 Thread Greg Snow
If you add column names to your contrast matrix (treat3) then those names will be used in the coefficient names. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [

Re: [R] gstat error

2011-08-03 Thread Peter Ehlers
On 2011-08-03 09:40, gbre...@ssc.wisc.edu wrote: Hello. I am running the examples provided in the gstat help menus. When I try to run the following in predict.gstat: data(meuse) coordinates(meuse)= ~x+y v<-variogram(log(zinc)~1, meuse) I get the following error message: Error in vector("doub

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread David Winsemius
On Aug 3, 2011, at 12:20 PM, jim holtman wrote: This takes about 2 secs for 1M rows: n <- 100 exampledata <- data.frame(orderID = sample(floor(n / 5), n, replace = TRUE), itemPrice = rpois(n, 10)) require(data.table) # convert to data.table ed.dt <- data.table(exampledata) system.time(

Re: [R] R CMD check problem

2011-08-03 Thread Duncan Murdoch
On 03/08/2011 12:47 PM, Baidya Nath Mandal wrote: Dear Murdoch, After setting CYGWIN=nodosfilewarning, i re-ran the R CMD check and got following message: * installing *source* package 'mypackage' ... ** libs ERROR: compilation failed for package 'mypackage' * removing 'C:/Rpackages/mypackage.R

Re: [R] strsplit and forward slash '/'

2011-08-03 Thread Federico Calboli
On 3 Aug 2011, at 17:46, Sarah Goslee wrote: > Hi Federico, > > A forward slash isn't a special character: > >> strsplit("T/T", "/") > [[1]] > [1] "T" "T" > > so there's some other problem. > > Are you sure that your first column contains strings and not factors? > What does str(my.data) tell

Re: [R] strsplit and forward slash '/'

2011-08-03 Thread Federico Calboli
On 3 Aug 2011, at 17:41, Duncan Murdoch wrote: > > It looks as though your my.data[1,1] value is a factor, not a character value. > > strsplit(as.character(my.data[1,1]), "/") Thanks Duncan, this solved it. Best Federico > > would work, or you could avoid getting factors in the first plac

Re: [R] strsplit and forward slash '/'

2011-08-03 Thread Sarah Goslee
Hi Federico, A forward slash isn't a special character: > strsplit("T/T", "/") [[1]] [1] "T" "T" so there's some other problem. Are you sure that your first column contains strings and not factors? What does str(my.data) tell you? Does strsplit(as.character(my.data[1,1]), "/") work? If you us

Re: [R] strsplit and forward slash '/'

2011-08-03 Thread Duncan Murdoch
On 03/08/2011 12:37 PM, Federico Calboli wrote: Hi All, is there a way of using strsplit with a forward slash '/' as the splitting point? For data such as: 1 T/TC/C 16/33 2 T/TC/C 33/36 3 T/TC/C 16/34 4 T/TC/C 16/31 5 C/CC/C 28/29 6 T/T

[R] gstat error

2011-08-03 Thread gbrenes
Hello. I am running the examples provided in the gstat help menus. When I try to run the following in predict.gstat: data(meuse) coordinates(meuse)= ~x+y v<-variogram(log(zinc)~1, meuse) I get the following error message: Error in vector("double", length) : invalid 'length' argument What's t

[R] strsplit and forward slash '/'

2011-08-03 Thread Federico Calboli
Hi All, is there a way of using strsplit with a forward slash '/' as the splitting point? For data such as: 1 T/TC/C 16/33 2 T/TC/C 33/36 3 T/TC/C 16/34 4 T/TC/C 16/31 5 C/CC/C 28/29 6 T/TC/C 16/34 strsplit(my.data[1,1], "/") # and an

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread jim holtman
This takes about 2 secs for 1M rows: > n <- 100 > exampledata <- data.frame(orderID = sample(floor(n / 5), n, replace = TRUE), > itemPrice = rpois(n, 10)) > require(data.table) > # convert to data.table > ed.dt <- data.table(exampledata) > system.time(result <- ed.dt[ +

Re: [R] Extract p value from coxme object

2011-08-03 Thread Terry Therneau
You can look at the code coxme:::print.coxme There you will see that the global test is a chisquare chi1 <- 2*diff(x$loglik[1:2]) with x$df[1] degrees of freedom. The fixed effects coefficients are found in x$coefficients$fixed, and the variances are diag(x$var)[-(1:nfrail)]

Re: [R] Error Installing or Updating Packages (Maybe because of a proxy)

2011-08-03 Thread Uwe Ligges
1. you wrote to the mailing list rather than to the original poster. 2. you forgot to cite the original post, hence we do not know what you are referring to. PLease do read the posting guide to this list! Uwe Ligges On 03.08.2011 14:53, mohammad...@gmail.com wrote: Hello David, I encounter

[R] How to calculate the number of times a given string can be displayed in the width of a grid viewport

2011-08-03 Thread Sébastien Bihorel
There was too many spelling mistakes in my original post so I have decided to re-submit it. So here is it Dear R users, I am trying to determine how many characters can be displayed within the width of an open grid viewport. Unfortunately, the arithmetic operation that seems obvious in this case

Re: [R] 3D Bar Graphs in ggplot2?

2011-08-03 Thread Brian Diggs
On 8/3/2011 6:07 AM, wwreith wrote: So I take it 3D pie charts are out? At least with ggplot, yes. 2D pie charts are somewhat tricky with ggplot, even. They can be gone with stacked, normalized bar charts projected into polar coordinates, if I recall properly. Not limited to ggplot, there

Re: [R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread Justin
zcatav gmail.com> writes: > > Your suggestion works perfect as i pointed previous message. Now have another > question about data editing. I try this code: > X[X[,"c"]==1,"b"]<-X[,"d"] > and results with error: `[<-.data.frame`(`*tmp*`, X[, "c"] == 1, "b", value > = c(NA, : > replacement has

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread David Winsemius
On Aug 3, 2011, at 9:59 AM, ONKELINX, Thierry wrote: Dear Caroline, Here is a faster and more elegant solution. n <- 1 exampledata <- data.frame(orderID = sample(floor(n / 5), n, replace = TRUE), itemPrice = rpois(n, 10)) library(plyr) system.time({ + ddply(exampledata, .(order

[R] How to calculate the number of time a given string can be displayed in the width of a grid viewport

2011-08-03 Thread Sébastien Bihorel
Dear R users, I am trying to determine how many characters can be displayed within the width of an open grid viewport. Unfortunately, the arithmetic operation that seems obvious in this case is be permitted with unit objects (see example below). Although it isa brut force way to get this number (u

Re: [R] Running R in a sandbox

2011-08-03 Thread Gavin Simpson
On Wed, 2011-08-03 at 11:04 +0300, Antonio Rodriges wrote: > Hello, > > The idea is to grant access of remote users to R running on Linux. > Users must have ability to run their > R scripts but avoid corrupting the operating system. > > How one can restrict/limit access of remote users to certain

Re: [R] Combining multiple dependent variables for machine learning -- fortunes candidate?

2011-08-03 Thread Bert Gunter
I thought Sarah's reply was great and, alas, should probably be templated for this list. Not sure it fits as a fortunes package entry, but I thought it at least worthy of consideration. Cheers, Bert >> ... >> I appreciate any suggestions for this problem. Sarah Goslee replied: > Suggestions? Ye

[R] How to map current Europe?

2011-08-03 Thread tn85
Hello All, I was trying to generate a map of Europe with the following codes: europe<-map(database="world", fill=FALSE, plot=TRUE,xlim=c(-25,70),ylim=c(35,71)) However, the "world" database is too old to have right European country names. Could anyone help? Thanks, Tianchan -- View this messa

[R] Rattle loading String to Vector file from WEKA

2011-08-03 Thread NightWolf
Hi all, I have been using WEKA to do some text classification work and I want to try out R. The problem is I cannot load the String to Vector ARFF files created by WEKA's string parser into Rattle . Looking at the logs I get something like: /Error in scan(file, what, nmax, sep, dec, quote, ski

[R] lme4 help pls!

2011-08-03 Thread xy
Hi, I have some difficulties to work with the function lmer from lme4. My responses are binary form and i want to use forward selection to my 12 covariates but i dont know how can I choose them based on deviance. Can someone pls give me a example so i can apply. For example my covariates are gesta

Re: [R] Memory limit in Aggregate()

2011-08-03 Thread Guillaume
Hi Peter, Thanks for these information. I used a column concatenating the listBy data to do this aggregation : (I don't know if it's the best solution, but it seems to work). aggregateMultiBy <- function(x, by, FUN){ tableBy = data.frame(by) tableBy$byKey = "" for(colBy in

Re: [R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
David Winsemius wrote: > > On Aug 3, 2011, at 8:09 AM, zcatav wrote: > > You need to apply the same logical test/selection on the rows of the > RHS as you are doing on the LHS. > Possibly: > > X[ X[,"c"]==1, "b"] <- X[ X[,"c"]==1, "d"] > > This solution was suggeste

Re: [R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread zcatav
Gabor Grothendieck wrote: > > On Wed, Aug 3, 2011 at 8:09 AM, zcatav wrote: >> Your suggestion works perfect as i pointed previous message. Now have >> another >> question about data editing. I try this code: >> X[X[,"c"]==1,"b"]<-X[,"d"] >> and results with error: `[<-.data.fr

[R] step

2011-08-03 Thread Diana Schwegler
Hello I am using the "step" function in order to do backward selection for a linear model of more than 200 variables but it doesn't work correctly. I think, there is a problem, if the matrix has same or more columns than rows. And if the matrix has too much columns the step-function doesn't work b

Re: [R] syntax with do.call and `[`

2011-08-03 Thread Prof Brian Ripley
On Wed, 3 Aug 2011, peter dalgaard wrote: On Aug 3, 2011, at 12:30 , Jannis wrote: Dear List, i would like to mimic the behaviour or the following indexing with a do.call construct to be able to supply the arguments to `[` as a list: test = matrix[1:4,2] result = test[2,] My try, h

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread David Winsemius
On Aug 3, 2011, at 9:25 AM, Caroline Faisst wrote: Hello there, I’m computing the total value of an order from the price of the order items using a “for” loop and the “ifelse” function. Ouch. Schools really should stop teaching SAS and BASIC as a first language. I do this on a large

Re: [R] syntax with do.call and `[`

2011-08-03 Thread peter dalgaard
On Aug 3, 2011, at 12:30 , Jannis wrote: > Dear List, > > > > i would like to mimic the behaviour or the following indexing with a do.call > construct to be able to supply the arguments to `[` as a list: > > > test = matrix[1:4,2] > > result = test[2,] > > > My try, however, did not wo

[R] confint() in stats4 package

2011-08-03 Thread Jinsong Zhao
Hi there, I had a problem when I hoped to get confidence intervals for the parameters I got using mle() of stats4 package. This problem would not appear if ``fixed'' option was not used. The following mini-example will demo the problem: x <- c(100, 56, 32, 18, 10, 1) r <- c(18, 17, 10, 6, 4,

Re: [R] lattice: index plot

2011-08-03 Thread Peter Ehlers
On 2011-08-03 00:24, Thaler,Thorn,LAUSANNE,Applied Mathematics wrote: Does xyplot(y ~ seq_along(y), xlab = "Index") do what you want? Not exactly, because it does not work once multipanel conditioning comes into play: xyplot(y~seq_along(y)|factor(rep(1:2, each=5)), xlab = "Index") The p

Re: [R] Combining multiple dependent variables for machine learning

2011-08-03 Thread Sarah Goslee
Hi, On Wed, Aug 3, 2011 at 10:06 AM, Vishal Thapar wrote: > Hi, > > I apologize for posting this here, I am also trying to post this on machine > learning emailing lists. > I have a set (18K) of sequences (22 nt long) and I have their counts at 4 > different stages. The difference in counts from

Re: [R] Need to compute density as done by panel.histogram

2011-08-03 Thread Sébastien Bihorel
Thank you very much Peter, I'm going to dig deeper into the code of the functions you've listed. On Wed, Aug 3, 2011 at 6:57 AM, Peter Ehlers wrote: > On 2011-08-02 11:51, Sébastien Bihorel wrote: > >> Hi, >> >> This might be a simple problem but I don't know how to calculate a random >> varia

[R] Combining multiple dependent variables for machine learning

2011-08-03 Thread Vishal Thapar
Hi, I apologize for posting this here, I am also trying to post this on machine learning emailing lists. I have a set (18K) of sequences (22 nt long) and I have their counts at 4 different stages. The difference in counts from one stage to the next represents how well the sequence performed in th

Re: [R] slow computation of functions over large datasets

2011-08-03 Thread ONKELINX, Thierry
Dear Caroline, Here is a faster and more elegant solution. > n <- 1 > exampledata <- data.frame(orderID = sample(floor(n / 5), n, replace = TRUE), > itemPrice = rpois(n, 10)) > library(plyr) > system.time({ + ddply(exampledata, .(orderID), function(x){ + data.frame(itemPr

[R] equivalent of var.test(x,y) for skew and kurtosis

2011-08-03 Thread Timothy Bates
Dear R-users, I am comparing differences in variance, skew, and kurtosis between two groups. For variance the comparison is easy: just var.test(group1, group2) I am using agostino.test() for skew, and anscombe.test() for kurtosis. However, I can't find an equivalent of the F.test or Mood.tes

[R] slow computation of functions over large datasets

2011-08-03 Thread Caroline Faisst
Hello there, I’m computing the total value of an order from the price of the order items using a “for” loop and the “ifelse” function. I do this on a large dataframe (close to 1m lines). The computation of this function is painfully slow: in 1min only about 90 rows are calculated. The computati

Re: [R] Error Installing or Updating Packages (Maybe because of a proxy)

2011-08-03 Thread mohammad...@gmail.com
Hello David, I encountered the same problem of yours. What did you do to resolve it? Thanks for your reply Mohammad -- View this message in context: http://r.789695.n4.nabble.com/Error-Installing-or-Updating-Packages-Maybe-because-of-a-proxy-tp3462312p3715332.html Sent from the R help mailing lis

Re: [R] Running R in a sandbox

2011-08-03 Thread Barry Rowlingson
On Wed, Aug 3, 2011 at 9:04 AM, Antonio Rodriges wrote: > Hello, > > The idea is to grant access of remote users to R running on Linux. > Users must have ability to run their > R scripts but avoid corrupting the operating system. Ordinary users can't corrupt the operating system on Linux[1]. The

Re: [R] conditional data replace (recode, change or whatsoever)

2011-08-03 Thread David Winsemius
On Aug 3, 2011, at 8:09 AM, zcatav wrote: Your suggestion works perfect as i pointed previous message. Now have another question about data editing. I try this code: X[X[,"c"]==1,"b"]<-X[,"d"] and results with error: `[<-.data.frame`(`*tmp*`, X[, "c"] == 1, "b", value = c(NA, : replaceme

Re: [R] 3D Bar Graphs in ggplot2?

2011-08-03 Thread wwreith
So I take it 3D pie charts are out? P.S. It is not about hiding anything. It is about consulting and being told by your client to make 3D pie charts and change this font or that color to make the graphs more apealing. Given that I am the one trying to open the door to using R where I work it woul

Re: [R] xlsx error

2011-08-03 Thread Dieter Menne
Andrew Winterman wrote: > > > I'm trying to use the xlsx package to read a series of excel spreadsheets > into R, but my code is failing at the first step. > > I setwd into my the directory with the spreadsheets, and, as a test ask > for > the first one: > >read.xlsx(file = "Argentina Fina

Re: [R] Running R in a sandbox

2011-08-03 Thread Dieter Menne
Antonio Rodriges wrote: > > > The idea is to grant access of remote users to R running on Linux. Users > must have ability to run their > R scripts but avoid corrupting the operating system. > > Check RStudio.org Dieter -- View this message in context: http://r.789695.n4.nabble.com/Runnin

Re: [R] How to make a nomogam and Calibration plot

2011-08-03 Thread Frank Harrell
The nomogram you included was produced by the Design package, the precursor to the rms package. You will have to take the time to intensively read the rms package documentation. Note that how you developed the model (e.g., allowing for non-linearity in log PSA, not using stepwise regression which

  1   2   >