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

2011-08-03 Thread sytangping
Dear Harrell, Many thanks for your quick response! However, after try and try, I still have difficulty to solve my questions. I post my questions again. I hope someone can help me run the data and draw the nomogram and calibration plot for me. I know that is not good but indeed I have no way to

[R] cdplot error

2011-08-03 Thread wildernessness
Fairly new at this. Trying to create a conditional density plot. cdplot(status~harvd.l,data=phy) Error in cdplot.formula(status~harvd.l,data=phy): dependent variable should be a factor What does this error mean? Status is a binary response of infestation (0/1) and harvd.l is the log of timber

[R] AICcmodavg functions and 'mer' class models

2011-08-03 Thread RonnyG
What is teh reason some functions in the AICcmodavg package do not work with 'mer' class models? One such example would be the 'importance' function. Thanks Ronny -- View this message in context: http://r.789695.n4.nabble.com/AICcmodavg-functions-and-mer-class-models-tp3714534p3714534.html Sent

Re: [R] create a list under constraints

2011-08-03 Thread Dennis Murphy
Hi: Here's one way; using the mdply() function in the plyr package: k - c(1,2,3,4,5) i - c(0,1,3,2,1) # Takes two scalars k and i as input, outputs a data frame ff - function(k, i) data.frame(k = rep(k, i+1), i = seq(0, i, by = 1)) library('plyr') mdply(data.frame(k, i), ff) # returns a data

Re: [R] Error while trying to install a package

2011-08-03 Thread Patrick Connolly
On Mon, 01-Aug-2011 at 02:55PM -0400, Sushil Amirisetty wrote: | | Hi Everyone, | | When i try to install a package using | | install.packages(agricolae) | --- Please select a CRAN mirror for use in this session --- | | | | | The cursor keeps blinking i dont get a popup menu to choose

Re: [R] convert a splus randomforest object to R

2011-08-03 Thread Duncan Mackay
Hi Jimmy Years ago I think that Splus introduced an argument when dumping of old.style = T or something similar to dump it into a form that could be read into R. This may only be for data.frames etc not things like random forest objects Regards Duncan Duncan Mackay Department of Agronomy

Re: [R] cdplot error

2011-08-03 Thread Allan Engelhardt (CYBAEA)
On 03/08/11 05:52, wildernessness wrote: Fairly new at this. Trying to create a conditional density plot. cdplot(status~harvd.l,data=phy) Error in cdplot.formula(status~harvd.l,data=phy): dependent variable should be a factor What does this error mean? Status is a binary response of

[R] Finding dependancies?

2011-08-03 Thread Rainer M Krug
Hi although the background is that it happened on an hpc cluster, this question does *not* concern hpc computing with R. I was using R on a cluster and had to install several packages in my home directory. Now the head node was migrated to new hardware (new install as well) and many dependencies

Re: [R] lattice: index plot

2011-08-03 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
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 points in the right panel are plotted from 6:10 while the points in the

Re: [R] cdplot error

2011-08-03 Thread Peter Ehlers
On 2011-08-02 21:52, wildernessness wrote: Fairly new at this. Trying to create a conditional density plot. cdplot(status~harvd.l,data=phy) Error in cdplot.formula(status~harvd.l,data=phy): dependent variable should be a factor What does this error mean? Status is a binary response of

[R] Running R in a sandbox

2011-08-03 Thread Antonio Rodriges
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 R functions? For example, dealing with IO (file system), graphical

[R] fixInNamespace

2011-08-03 Thread ms3437
Dear all, I would like to ask how one can access certain methods via fixInNamespace. Is there some option / way for selecting a certain methods for a defined signature. Thank you for your answer and efforts in advance! Best, Michael -- __

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

2011-08-03 Thread zcatav
Hello, I have a big data.frame, a piece of it as follows. a b c d 1 58009 2010-11-02 0 NA 2 114761 NA 1 2008-11-05 3 184440 NA 1 2009-12-08 4

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

2011-08-03 Thread Petr PIKAL
Hi Hello, I have a big data.frame, a piece of it as follows. a b c d 1 58009 2010-11-02 0 NA 2 114761 NA 1 2008-11-05 3 184440 NA 1 2009-12-08 4 189372 NA 0 NA 5 105286

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

2011-08-03 Thread Romain DOUMENC
Please do your homework before asking the list: An introduction to R, chapter 7 Am 03.08.2011 10:05, schrieb zcatav: Hello, I have a big data.frame, a piece of it as follows. a b c d 1 58009 2010-11-02 0 NA 2

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

2011-08-03 Thread fraenzi . korner
Wir sind bis am 20. August in den Ferien und werden keine e-mails beantworten. Bei dringenden Fällen melden Sie sich bei Stefanie von Felten steffi.vonfel...@oikostat.ch We are on vacation until 20. August. In urgent cases, please contact Stefanie von Felten steffi.vonfel...@oikostat.ch

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

2011-08-03 Thread Jannis
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 work: result = do.call(`[`,list(test,2,NULL)) result =

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

2011-08-03 Thread Peter Ehlers
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 variable density the way panel.histogram does it before it creates the actual density rectangles. The documentation says that it uses the density function but the actual

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

2011-08-03 Thread R. Michael Weylandt michael.weyla...@gmail.com
As others have noted, this is discussed in many free R tutorials, but if you want to do it in one line I think this should do it: X[is.NA(X[,b])(X[,c]==0),b]-2011-07-28 #where X is the name of the data frame. It's a somewhat convoluted line of code but if you read it inside out the logic is

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

2011-08-03 Thread zcatav
Petr Pikal wrote: Hi I believe there are better solutions but I would use two steps select rows where c==0 (see also FAQ 7.31) sel-which(big.data.frame$c==0) change NA values in b column based on sel big.data.frame$b[sel][is.na(big.data.frame$b[sel])]-20011-07-28 Beware of data

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

2011-08-03 Thread zcatav
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 9 rows, data has 2 Logically i selected 2 rows with

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

2011-08-03 Thread Peter Morgan
Dear R Users, Am using lm() with contrasts as below. If I skip the contrasts() statement, I get the coefficient names to be names(results$coef) [1] (Intercept) VarAcat VarArat VarB which are much more meaningful than ones based on integers. Can anyone tell me how to get R to keep

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

2011-08-03 Thread R. Michael Weylandt michael.weyla...@gmail.com
As R notes, the problem is that you are trying to fit 9 rows into two: specifically, note that on the left hand side you select only those rows such that X[,c]==1 (which is 2 for your data) while on the right hand you select all 9rows of column d so they simply don't fit. If you change the code to

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

2011-08-03 Thread Gabor Grothendieck
On Wed, Aug 3, 2011 at 8:09 AM, zcatav zca...@gmail.com 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,  :  

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

2011-08-03 Thread Jean V Adams
Good question, Jannis. I couldn't figure out how to specify the j argument in the [ function as empty or missing either. One work around is to specify ALL the columns as the j argument: test - matrix(1:4, 2) # I think this is what you meant in your original post, not matrix[1:4, 2]

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

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:

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 Final.xls,

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

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, : replacement has 9

Re: [R] Running R in a sandbox

2011-08-03 Thread Barry Rowlingson
On Wed, Aug 3, 2011 at 9:04 AM, Antonio Rodriges antonio@gmail.com 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

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

[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

[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

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(itemPrice =

[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

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 ehl...@ucalgary.ca 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

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 vishaltha...@gmail.com 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

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

[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] 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 work: result

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

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,

[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

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 lt;zca...@gmail.comgt; 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*`,

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 suggested by R. Michael

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

[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

[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,

[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 message

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? Yes.

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 R

[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

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,

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

2011-08-03 Thread Justin
zcatav zcatav at 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 9 rows,

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,

[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] 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

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

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[ + ,

[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 any

[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 the

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

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 used

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 place,

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 you? Does

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

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)

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

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] 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] 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

[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.119287147905722, 0.356427096010845, 1, 1103, 18,

[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) ? _

[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-

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] 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
Many many thanks, working now. Best, BN Mandal On Wed, Aug 3, 2011 at 10:34 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: 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: *

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,

[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

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

[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

[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

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 dwinsem...@comcast.net wrote: On Aug 3, 2011, at 2:01 PM, Ken wrote: Hello, Perhaps transpose the table

[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, 1103, 18, OPEN, DEPR,

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 dwinsem...@comcast.net wrote: On Aug 3, 2011, at 12:20 PM, jim holtman wrote: This takes

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 johjeff...@hotmail.com wrote: I have a matrix that looks like this: structure(c(0.0376673981759913, 0.111066500741386, 1, 1103, 18, OPEN, DEPR, 0.0404073656092023,

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] 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 ראובן אברמוביץ gantk...@walla.com:   Can I put limits on the

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 johjeff...@hotmail.com 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,

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: r-help@r-project.org Subject: Re: [R] Convert matrix to numeric How about

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

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

[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) Anyhelp

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

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] 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 ראובן אברמוביץgantk...@walla.com

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

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

  1   2   >