[R] SOM library - where do I find it

2009-11-18 Thread tdm
R version 2.9.2 (2009-08-24) - for windows > library(SOM) Error in library(SOM) : there is no package called 'SOM' Where can I get the SOM library from? Thanks in advance -- View this message in context: http://old.nabble.com/SOM-library---where-do-I-find-it-tp26415633p26415633.html Sent fro

Re: [R] Logistic and Linear Regression Libraries

2009-10-31 Thread tdm
OK, I think I've figured it out, the predict of lrm didn't seem to pass it through the logistic function. If I do this then the value is similar to that of lm. Is this by design? Why would it be so? 1 / (1 + Exp(-1 * 3.38)) = 0.967 tdm wrote: > > > Anyway, do you know

Re: [R] Logistic and Linear Regression Libraries

2009-10-31 Thread tdm
f disappointing, I think the answer to your question is > "no". You will need to seek out the algorithms from the published > information on them individually. > > W. > > From: r-help-boun...@r-project.org [r-help-boun...@r-project.

[R] Logistic and Linear Regression Libraries

2009-10-30 Thread tdm
Hi all, I'm trying to discover the options available to me for logistic and linear regression. I'm doing some tests on a dataset and want to see how different flavours of the algorithms cope. So far for logistic regression I've tried glm(MASS) and lrm (Design) and found there is a big differenc

Re: [R] plotting labels (not values) on xy plot

2009-10-19 Thread tdm
Thanks Jim - that worked. Jim Lemon-2 wrote: > > On 10/20/2009 01:10 PM, tdm wrote: >> I have 2 vectors, x and y and have done an xy plot. >> >> I want to plot the label (name?) of the vector on the plot rather than >> the >> value. >> >> tex

[R] plotting labels (not values) on xy plot

2009-10-19 Thread tdm
I have 2 vectors, x and y and have done an xy plot. I want to plot the label (name?) of the vector on the plot rather than the value. text(x,y, labels = x) gives me the value of x. text(x,y, labels = labels(x)) gives me something like c("text1","text2"..) plotted for each point text(x,y, la

Re: [R] modifying model coefficients

2009-10-19 Thread tdm
usdm09.freeforums.org/post34.html#p34 tdm wrote: > > I have build a model but want to then manipulate the coefficients in some > way. > > I can extract the coefficients and do the changes I need, but how do I > then put these new coefficients back in the model so I can use the predict &g

[R] modifying model coefficients

2009-10-18 Thread tdm
I have build a model but want to then manipulate the coefficients in some way. I can extract the coefficients and do the changes I need, but how do I then put these new coefficients back in the model so I can use the predict function? my_model <- lm(x ~ . , data=my_data) my_scores <- predict(my

[R] populating an array

2009-10-14 Thread tdm
Hi, Can someone please give me a pointer as to how I can set values of an array? Why does the code below not work? my_array <- array(dim=c(2,2)) my_array[][] = 0 my_array [,1] [,2] [1,]00 [2,]00 for(i in seq(1,2,by=1)){ for(j in seq(1,2,by=1)){ my_array[i][j] = 5 } }

Re: [R] field index given name.

2009-10-12 Thread tdm
te: > > Hi Phil > Try the following >> which(names(iris)=='Species') > [1] 5 > > HTH > Schalk Heunis > > On Mon, Oct 12, 2009 at 8:53 AM, tdm wrote: > >> >> Hi, >> >> How do I access the index number of a field given I only kn

[R] field index given name.

2009-10-11 Thread tdm
Hi, How do I access the index number of a field given I only know the field name? eg - I want to set the probability of the field 'species' higher than the other fields to use in sampling. > colprob <- array(dim=NCOL(iris)) > for(i in 1:NCOL(iris)){colprob[i]=0.5} > colprob[iris$species] = 1 #t

Re: [R] field names as function parameters

2009-10-11 Thread tdm
Thanks, just the clue I needed, worked a treat. baptiste auguie-5 wrote: > > Hi, > > I think this is a case where you should use the ?"[[" extraction > operator rather than "$", > > d = data.frame(a=1:3) > mytarget = "a" > d[[

[R] field names as function parameters

2009-10-10 Thread tdm
Hi, I am passing a data frame and field name to a function. I've figured out how I can create the formula based on the passed in field name, but I'm struggling to create a vector based in that field. for example if I hard code with the actual field name Y = df$Target, everything works fine. bu

[R] passing field name parameter to function

2009-10-10 Thread tdm
Hi, I am passing a data frame and field name to a function. I've figured out how I can create the formula based on the passed in field name, but I'm struggling to create a vector based in that field. for example if I hard code with the actual field name Y = df$Target, everything works fine.