Re: [R] Understanding classes in R

2013-09-29 Thread Barry Rowlingson
On Sun, Sep 29, 2013 at 10:48 PM, john doe wrote: > I am having trouble understanding how classes in R work. Here is a small > reproducable example: > >> x=1 >> class(x) > [1] "numeric" > > OK. When a variable is a number, its class is "numeric". Does R have > multiple types for numbers, like C

[R] str_count counts the substring

2013-09-29 Thread agrima srivastava
I am trying to count the number of times a word occurs in a string. and using str_count function from the package stringr. This function counts the substrings as well. Is there a way in which I can exclude the substring count and just take the exact match. Thanks in advance. -- Thanks and Regar

Re: [R] Understanding classes in R

2013-09-29 Thread Ista Zahn
Hi JD, On Sun, Sep 29, 2013 at 5:48 PM, john doe wrote: > I am having trouble understanding how classes in R work. Here is a small > reproducable example: > >> x=1 >> class(x) > [1] "numeric" > > OK. When a variable is a number, its class is "numeric". Does R have > multiple types for numbers,

Re: [R] Understanding classes in R

2013-09-29 Thread David Winsemius
On Sep 29, 2013, at 2:48 PM, john doe wrote: > I am having trouble understanding how classes in R work. Here is a small > reproducable example: > >> x=1 >> class(x) > [1] "numeric" > > OK. When a variable is a number, its class is "numeric". Does R have > multiple types for numbers, like C++

Re: [R] Understanding classes in R

2013-09-29 Thread Bert Gunter
R-help is not the place for an extended tutorial the R class systems (there are in fact at least two, S3 and S4, neither of which is like C++ classes). Read the "R Language Definition" Manual that ships with R, John Chambers's books (probably the latest for S4), or search the web for tutorials (the

[R] Understanding classes in R

2013-09-29 Thread john doe
I am having trouble understanding how classes in R work. Here is a small reproducable example: > x=1 > class(x) [1] "numeric" OK. When a variable is a number, its class is "numeric". Does R have multiple types for numbers, like C++ (eg integer, float, double). If so, where can I see a list, a

[R] useR! 2014: call for tutorial proposals

2013-09-29 Thread Mullen, Katharine
We are pleased to announce that the R user conference useR! 2014 is scheduled for July 1-3, 2014, and will take place at the University of California, Los Angeles. As for the predecessor conferences, the program will consist of two parts: invited lectures and user-contributed sessions (abstr

Re: [R] explination

2013-09-29 Thread Mrwan Sweedan
My apology that email went to the wrong address, i am taking a course on coursera about R language and the email was for the instructor.  again, please accept my sincere apology  and thank you for your answers.    MARWAN SWEEDAN 369-B 3rd st., #528 San Rafael, CA 94901 (408)310-0096  

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

2013-09-29 Thread E Joffe
HI, Thank you for your answer. There were 301 events out of 394 observations. Study goals: Identify proteins with prognostic power in patients with AML. There were 232 proteins studied. Traditional models won't converge. I wanted to do a multivariate survival analysis that would allow me to ident

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

2013-09-29 Thread E Joffe
Thank you so much for this answer. Per your comment I have moved the discussion (including your answer) to StackExchange At http://stats.stackexchange.com/questions/71417/what-is-a-good-fit-brier-scor e-and-harrels-c-index Many thanks ! Erel -Original Message- From: David Winsemius [mail

Re: [R] explination

2013-09-29 Thread Rui Barradas
Hello, Sorry, after reading David's answer I realized you are using RStudio. Forget what I've said about RGui, then. Anyway, the manual should be the one I've mentioned. Rui Barradas Em 29-09-2013 20:43, Rui Barradas escreveu: Hello, You've posted in the wrong mailing list. 1. You've down

Re: [R] explination

2013-09-29 Thread Rui Barradas
Hello, You've posted in the wrong mailing list. 1. You've downloaded R version 2.15.0 but the current version is 3.0.2. You should update to the current version. 2. As for the manual, in your directory of R, probably C:\PROGRA~1\R you will find a folder named 'doc\manual'. The manual you are l

Re: [R] explination

2013-09-29 Thread David Winsemius
On Sep 29, 2013, at 11:57 AM, Mrwan Sweedan wrote: > Hi, > i downloaded R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386 > (32-bit) + Deducer + R studio. That appears to be someone's effort at bundling package and the RStudio IDE. RStudio has its own help forum. > I am facing fe

[R] explination

2013-09-29 Thread Mrwan Sweedan
Hi, i downloaded R version 2.15.0 (2012-03-30) Platform: i386-pc-mingw32/i386 (32-bit) + Deducer + R studio. I am facing few problem : 1- I don't know where to find the manual you talked about so i can read it and get help from it. 2- what is console and where I can find it to use it? 3- what is

Re: [R] Help: concurrent R sessions for different settings of simulations

2013-09-29 Thread Henrik Bengtsson
I strongly suggest to use the BatchJobs package [http://cran.r-project.org/web/packages/BatchJobs] for this. It is easy to install and cross platform and does not rely on external software such as perl. It allows you develop your script running sequentially/interactively on your local machine/lap

Re: [R] DEoptim inconsistent output

2013-09-29 Thread Simon Zehnder
It's always a good thing to trace the optimization. There can be a lot of reasons: Is the function correctly implemented? Is it defined for all values? If not, is it defined for all values in the constrained parameter space? Is it defined for the constraint? If it is not defined for the constr

[R] DEoptim inconsistent output

2013-09-29 Thread Aya Anas
Dear all, I wrote an R optimization code using the DEoptim package that is used to minimize a numerical integration subject to a single constraint. I noticed that the code takes a long time to give an output. The resulting output doesn't make sense at all. I got parameters that don't satisfy the

Re: [R] Help: concurrent R sessions for different settings of simulations

2013-09-29 Thread Ted Harding
[See at end] On 29-Sep-2013 17:22:24 Chee Chen wrote: > Dear All, > I have spent almost 2 days but did not succeed yet. > > Problem description: I have 3 parameters, p1, p2 and p3, for which > p1 take 1 of 5 possible distributions (e.g., normal, laplace), > p2 takes 1 of 3 possible distributions

[R] Help: concurrent R sessions for different settings of simulations

2013-09-29 Thread Chee Chen
Dear All, I have spent almost 2 days but did not succeed yet. Problem description: I have 3 parameters, p1, p2 and p3, for which p1 take 1 of 5 possible distributions (e.g., normal, laplace), p2 takes 1 of 3 possible distributions, and p3 takes 1 of 5 possible distribution. These 3 parameters

[R] How to avoid "$ operator is invalid for atomic vectors" Thu Nov 6 19:04:49 CET 2008

2013-09-29 Thread Bruce Petrovics
Thanks for your R help, posted at https://stat.ethz.ch/pipermail/r-help/2008-November/179050.html I also found this very helpful at http://stackoverflow.com/questions/11105234/filtering-out-rows-in-a-matrix-containing-only-0-in-r: Filtering out rows in a matrix containing only 0 in R

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

2013-09-29 Thread Rafał Wojdan
Dear All, thank you for all answers. First answer helped me understand the performance of code better, second showed me how to solve the problem easier and third provided me with interesting pdf to learn. I am very grateful for your help. Best regards, Rafa³ 2013/9/29 Patrick Burns > See Ci

Re: [R] Error for atomic vectors and integers issue

2013-09-29 Thread peter dalgaard
On Sep 29, 2013, at 02:06 , Guy Wachsman wrote: > Hi all, > > I was doing a PCA o the iris data set but when trying to rbind the "Species" > column back from the original data set, it turned into 1:3 integers instead > of the original ones. I noticed that the original names of the species are

Re: [R] Error for atomic vectors and integers issue

2013-09-29 Thread Prof Brian Ripley
Please do read the help for cbind(). 'iris' is a data frame, and you created a matrix. Most likely you intended iris.bind <- data.frame(x = iris.sub.pca$x, Species = iris$Species) On 29/09/2013 01:06, Guy Wachsman wrote: Hi all, I was doing a PCA o the iris data set but when trying to rbin

[R] Error for atomic vectors and integers issue

2013-09-29 Thread Guy Wachsman
Hi all, I was doing a PCA o the iris data set but when trying to rbind the "Species" column back from the original data set, it turned into 1:3 integers instead of the original ones. I noticed that the original names of the species are of type "integer", but I don't understand why, and how to p

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

2013-09-29 Thread Patrick Burns
See Circle 8.1.3 of 'The R Inferno'. http://www.burns-stat.com/documents/books/the-r-inferno/ Pat On 28/09/2013 16:18, rafae...@poczta.fm wrote: 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