Re: [R] Plot lines whose angle and length depict vector quantities

2013-09-28 Thread Patrick Burns
On 27/09/2013 21:01, Bert Gunter wrote: On Fri, Sep 27, 2013 at 12:44 PM, Sarah Goslee sarah.gos...@gmail.com wrote: It's a straightforward trigonometry problem, isn't it? Indeed! ( (r,theta) to (x,y) coordinates ) . So I wonder if this is a homework problem. If so, the OP should note that

Re: [R] Logical indexing not working

2013-09-28 Thread Patrick Burns
This is Circle 8.1.6 of 'The R Inferno'. http://www.burns-stat.com/documents/books/the-r-inferno/ Pat On 27/09/2013 19:20, Mariki Zietsman wrote: I have a data frame frugivore.abundance.S1 where some columns are factors and others are numbers.For example these are my independent variables

[R] Interperting results of glmnet and coxph plot, Brier score and Harrel's C-Index - am I doing something wrong ???

2013-09-28 Thread E Joffe
Hi all, I am using COX LASSO (glmnet / coxnet) regression to analyze a dataset of 394 obs. / 268 vars. I use the following procedure: 1. Construct a coxnet on the entire dataset (by cv.glmnet) 2. Pick the significant features by selecting the non-zero coefficient under the best lambda

Re: [R] Plot lines whose angle and length depict vector quantities

2013-09-28 Thread Conor Ryan
Hi Jim, vectorField worked a treat - thanks! On 28 September 2013 01:57, Jim Lemon j...@bitwrit.com.au wrote: On 09/28/2013 04:56 AM, Conor Ryan wrote: I am trying to plot points on a map for each ship locations (lat/long), where each point is a line whose angle (degrees) denotes ships

Re: [R] Plot lines whose angle and length depict vector quantities

2013-09-28 Thread Conor Ryan
Certainly not a homework question. Elementary questions do not necessarily indicate that one is a student! Always learning... Dr Conor Ryan On 28 September 2013 11:39, Patrick Burns pbu...@pburns.seanet.com wrote: On 27/09/2013 21:01, Bert Gunter wrote: On Fri, Sep 27, 2013 at 12:44 PM,

Re: [R] Plot lines whose angle and length depict vector quantities

2013-09-28 Thread Conor Ryan
Hi Greg, thanks for your help. I found vectorFields, as suggested by Jim Lemon, in plotrix to be slightly easier (given my relatively basic R language knowledge!). Kind Regards, Conor On 27 September 2013 22:07, Greg Snow 538...@gmail.com wrote: The ms.arrows along with my.symbols in the

Re: [R] Interperting results of glmnet and coxph plot, Brier score and Harrel's C-Index - am I doing something wrong ???

2013-09-28 Thread Bert Gunter
This appears to be a statistics, not an R-help question, so should probably be asked on a statistics list, not here (e.g. stats.stackexchange.com). But if I understand your issue correctly, perhaps the heart f the matter is: why do you think a stable fit must explain a lot of the variation? Feel

Re: [R] Compare species presence and absence between sites

2013-09-28 Thread arun
I couldn't get the number you showed below each column number.  How did you get that one? library(XLConnect) wb- loadWorkbook(is_matrix1.xls) dataRM- readWorksheet(wb,sheet=is_matrix,rownames=1) mat1- as.matrix(dataRM) different - function(x, y) x == 1 y == 0 dat-

[R] What is a good fit Brier score and Harrel's C Index

2013-09-28 Thread E Joffe
Hi all, I am evaluating survival models using Brier score (peperr) and Harrel's C-Index (Hmisc). I am wondering: 1. What would be considered a good fit according to these scores (like the heuristic levels we have for R square in linear regressions) ? 2. Are there any papers to cite on the

Re: [R] Interperting results of glmnet and coxph plot, Brier score and Harrel's C-Index - am I doing something wrong ???

2013-09-28 Thread David Winsemius
On Sep 28, 2013, at 2:39 AM, E Joffe wrote: Hi all, I am using COX LASSO (glmnet / coxnet) regression to analyze a dataset of 394 obs. / 268 vars. I use the following procedure: 1. Construct a coxnet on the entire dataset (by cv.glmnet) 2. Pick the significant features by

Re: [R] Interperting results of glmnet and coxph plot, Brier score and Harrel's C-Index - am I doing something wrong ???

2013-09-28 Thread Frank Harrell
This entire procedure is not valid. You cannot use a penalized method for selecting variables then use an unpenalized procedure on those selected. Frank David Winsemius wrote On Sep 28, 2013, at 2:39 AM, E Joffe wrote: Hi all, I am using COX LASSO (glmnet / coxnet) regression to analyze a

Re: [R] What is a good fit Brier score and Harrel's C Index

2013-09-28 Thread David Winsemius
On Sep 28, 2013, at 8:14 AM, E Joffe wrote: Hi all, I am evaluating survival models using Brier score (peperr) and Harrel's C-Index (Hmisc). It's spelled 'Harrell'. I am wondering: 1. What would be considered a good fit according to these scores (like the heuristic levels we have

[R] Help with automation of WinBUGS from R

2013-09-28 Thread Anamika Chaudhuri
Hi: I have a question related to the R Code which calls BUGS. I have run the model in WinBUGS and it runs fine giving me the expected results. Below is the automation code used when I had single outcome or univariate data for Y’s. Now I want to use it for multiple outcomes. So the trial.data

Re: [R] makeCluster help needed

2013-09-28 Thread Uwe Ligges
Can you please upgrade R to R-3.0.2 and use the parallel package? And can you please explain why you want to start the workers manually? I'd be happy to look into the details if you can reproduce the problem with a recent version of R and the parallel package. Best, Uwe Ligges On

Re: [R] Error: C stack usage is too close to the limit when using list.files()

2013-09-28 Thread Jonathan Greenberg
Thanks all -- ok, so the symbolic link issue is a distinct possibility, but fundamentally doesn't solve the issue since most users will have symbolic links on their machines SOMEPLACE, so a full drive scan will run into these issues -- is list.files calling find, or is it using a different

Re: [R] Error: C stack usage is too close to the limit when using list.files()

2013-09-28 Thread Berend Hasselman
On 28-09-2013, at 19:51, Jonathan Greenberg j...@illinois.edu wrote: Thanks all -- ok, so the symbolic link issue is a distinct possibility, but fundamentally doesn't solve the issue since most users will have symbolic links on their machines SOMEPLACE, so a full drive scan will run into

[R] Strange result from single [] extract operator

2013-09-28 Thread rafael . 7
Hi All, I am using Rx64 3.0.1 on Windows 7 x64, and wanted to get two last rows from dataset. First, I tried library(datasets) data-airquality data[nrow(data)-1:nrow(data),] and received 152 rows sorted desc. Could you explain why it worked this way? I changed the extract line to:

[R] Help with simple as.POSIXlt or strptime

2013-09-28 Thread Leopoldo Catania
Hi, I really don't know what is wrong with my code, I have a character object and I need to have a POSIXlt object; my code is: date=Mon, 23 Sep 2013 06:45:05 GMT as.POSIXlt(date,format=%a, %d %b %Y %H:%M:%S %Z) [1] NA even with strptime(date,%a, %d %b %Y %H:%M:%S %Z) [1] NA Also if I remove Mon,

[R] Help about a R command

2013-09-28 Thread Srinivas Sridhara
Hi, I was trying to get an answer to this issue: bookRatingData - read.table(file.choose(),header=TRUE,nrows=1048570) Warning message: In read.table(file.choose(), header = TRUE, nrows = 1048570) : incomplete final line found by readTableHeader on 'C:\Users\srinivas\Downloads\BX-Book-Ratings

[R] Command line r

2013-09-28 Thread Tomek R
Hi, I have found myself often doing simple statistical analysis using Linux command line on a single dataset. Therefore, I put a perl script together, which makes it easier:https://github.com/religa/statshttps://github.com/religa/stats/blob/master/r The idea behind simpleR is that it becomes a

Re: [R] Strange result from single [] extract operator

2013-09-28 Thread William Dunlap
First, I tried library(datasets) data-airquality data[nrow(data)-1:nrow(data),] and received 152 rows sorted desc. Could you explain why it worked this way? I changed the extract line to: data[(nrow(data)-1):nrow(data),] and then I received what I wanted but still am curious about

Re: [R] Error: C stack usage is too close to the limit when using list.files()

2013-09-28 Thread William Dunlap
The issue is not symbolic links per se, but ones that form loops. Note that you can detect such loops by running 'find -L ...' and looking for the error messages. (find by default does not follow any symbolic links, which can be a problem also.) It is a shortcoming of the current version of

Re: [R] Help about a R command

2013-09-28 Thread Duncan Murdoch
On 13-09-28 11:18 AM, Srinivas Sridhara wrote: Hi, I was trying to get an answer to this issue: bookRatingData - read.table(file.choose(),header=TRUE,nrows=1048570) Warning message: In read.table(file.choose(), header = TRUE, nrows = 1048570) : incomplete final line found by

Re: [R] Help with simple as.POSIXlt or strptime

2013-09-28 Thread Jim Lemon
On 09/29/2013 01:27 AM, Leopoldo Catania wrote: Hi, I really don't know what is wrong with my code, I have a character object and I need to have a POSIXlt object; my code is: date=Mon, 23 Sep 2013 06:45:05 GMT as.POSIXlt(date,format=%a, %d %b %Y %H:%M:%S %Z) [1] NA even with strptime(date,%a,