Re: [R] Convert a factor to a numeric

2013-10-10 Thread Charles Determan Jr
data.matrix() should do the job for you Charles On Thu, Oct 10, 2013 at 8:02 AM, arun wrote: > Hi, > It is not clear whether all the variables are factor or only a few are.. > > dat<- read.table(text="acoef > coef.l coef.h > 1 1 0.005657825001254 0.00300612956

Re: [R] Convert a factor to a numeric

2013-10-10 Thread Charles Determan Jr
ke this or is it something else? > data.matrix(dat) # > a coef coef.l coef.h > 1 13 4 2 > 2 24 5 4 > 3 31 1 1 > 4 42 2 3 > 5 55 3 5 > > > A.K. > > > > > > > On Thursday, Oc

Re: [R] Convert a factor to a numeric

2013-10-10 Thread Charles Determan Jr
it is directly doing: > as.numeric() without the as.character() > For ex: > as.numeric(dat[,2]) > #[1] 3 4 1 2 5 > > > > > > On Thursday, October 10, 2013 9:33 AM, Charles Determan Jr < > deter...@umn.edu> wrote: > > I'm not honestly sure

Re: [R] Subseting a data.frame

2013-10-17 Thread Charles Determan Jr
ersion deleted]] > > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, mi

Re: [R] repeating values in an index two by two

2013-11-11 Thread Charles Determan Jr
gt; > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > > > -- > View this message in context: > http://r.789695.n4.nabble.com/repeating-values-in-an-in

Re: [R] frequency of numbers

2013-11-21 Thread Charles Determan Jr
> R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- Charles Determan Int

[R] 3rd attempt R2 and Q2 from pls regression

2012-03-05 Thread Charles Determan Jr
Greetings R users, I have been hoping someone would be familiar with this topic. I understand fully everything on this list is from the good graces of those who wish to help. Thanks to those who have helped in multiple circumstances. However, I wanted to post this question once more. I hope so

[R] Cumulative R2 and Q2 from plsr?

2012-01-25 Thread Charles Determan Jr
Greetings R users, I have been working on running plsda and I would like to have the R2 and Q2 values. I know the function R2 from the 'pls' package will generate both R2 and Q2 but they are for each separate class. Is there a way to get the cumulative R2 and Q2? R2(pls.new, estimate="all") Re

[R] Cumulative R2 and Q2 values?

2012-02-09 Thread Charles Determan Jr
Greetings R users, I have been working on running plsda and I would like to have the R2 and Q2 values. I know the function R2 from the 'pls' package will generate both R2 and Q2 but they are for each separate class. Is there a way to get the cumulative R2 and Q2 for the whole model? R2(pls.new,

[R] Numbers not numeric?

2012-04-20 Thread Charles Determan Jr
Greetings R users, I have a curious problem. I read in a csv file (subset shown below) as normal data=read.table("C:/Users/Chaz/Desktop/test.csv",sep=",",header=TRUE, na.strings=".") However, the numbers from the dataset are not registered as numeric: is.numeric(data$Mesh) [1] FALSE When I try

[R] PLS validation value

2012-05-02 Thread Charles Determan Jr
results in this difference? Any insight or assistance would be most appreciated. I certainly appreciate any time you take to answer my question. Regards, Charles Determan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] PLS Q2 value?

2012-05-10 Thread Charles Determan Jr
this difference? Any insight or assistance would be most appreciated.  I certainly appreciate any time you take to answer my question. Regards, Charles Determan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do r

[R] Covariance structure for lme

2012-05-17 Thread Charles Determan Jr
Greetings again R users, Some of you will likely recognize me but I hope you can help me once more. I have tried the mixed model mailing list for this question but have yet to find a solution. As such I hope someone will have another idea. I have previously attempted to replicate the UN, CS, an

[R] inner_perc_table?

2012-05-24 Thread Charles Determan Jr
Hello, Does anyone on this list know what inner_perc_table is or where it is typically found? I am trying to modify some source code and it is used with the .C() function. When I try and run it, it states that 'inner_perc_table is not found'. It is only called in such a way and isn't defined at

Re: [R] inner_perc_table?

2012-05-24 Thread Charles Determan Jr
ssed while doing this? Thanks, Charles On Thu, May 24, 2012 at 11:51 AM, Duncan Murdoch wrote: > On 24/05/2012 11:35 AM, Charles Determan Jr wrote: > >> Hello, >> >> Does anyone on this list know what inner_perc_table is or where it is >> typically found? I am try

Re: [R] inner_perc_table?

2012-05-24 Thread Charles Determan Jr
ction work? Regards, Charles On Thu, May 24, 2012 at 11:51 AM, Duncan Murdoch wrote: > On 24/05/2012 11:35 AM, Charles Determan Jr wrote: > >> Hello, >> >> Does anyone on this list know what inner_perc_table is or where it is >> typically found? I am trying to modify

Re: [R] inner_perc_table?

2012-05-24 Thread Charles Determan Jr
erc_table") > > identical(getNativeSymbolInfo(entry_point), > getNativeSymbolInfo("inner_perc_table")) > [1] TRUE > > identical(getNativeSymbolInfo(entry_points[2]), > getNativeSymbolInfo("inner_perc_table")) > [1] TRUE > > Bill Dunlap >

[R] count number of groups

2012-05-25 Thread Charles Determan Jr
Hello, Simple question that I am stuck on and can't seem to find an answer in the help files currently. I have a list which contains repeated ID's. I would like to have R count the number of ID's. For example: ID=c(1,1,1,1,2,2,2,2,3,3,3,3) as.data.frame(ID) Clearly, there are 3 groups. How w

Re: [R] count number of groups

2012-05-25 Thread Charles Determan Jr
ue(ID)) > > Michael > > On Fri, May 25, 2012 at 11:38 AM, Charles Determan Jr > wrote: > > Hello, > > > > Simple question that I am stuck on and can't seem to find an answer in > the > > help files currently. I have a list which contains repeated

Re: [R] count number of groups

2012-05-25 Thread Charles Determan Jr
, 2012 at 11:50 AM, Steve Friedman wrote: > ?table > On May 25, 2012 11:46 AM, "Charles Determan Jr" wrote: > >> Hello, >> >> Simple question that I am stuck on and can't seem to find an answer in the >> help files currently. I have a list which

Re: [R] count number of groups

2012-05-25 Thread Charles Determan Jr
sing something obvious] > > yourFunc <- function(x){ > dsx <- deparse(substitute(x)) > x <- length(unique(x)) > names(x) <- dsx > x > } > > yourFunc(ID) > > yourFunc(ID^2) > > yourFunc(ID[ID==2]) > > > etc. > > Hope this help

<    1   2