Re: [R] Why 'gbm' is not giving me error when I change the response from numeric to categorical?

2013-10-05 Thread Mary Kindall
, 2013 at 3:50 PM, Marc Schwartz wrote: > > On Oct 4, 2013, at 2:35 PM, peter dalgaard wrote: > > > > > On Oct 4, 2013, at 21:16 , Mary Kindall wrote: > > > >> Y[Y < mean(Y)] = 0 #My edit > >> Y[Y >= mean(Y)] = 1 #My edit > > > > I

Re: [R] Not getting any result from 'gbm'?

2013-10-05 Thread Mary Kindall
Sorry David, The formula that I use here is fmla = as.formula(Y ~ x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8) Thanks On Sat, Oct 5, 2013 at 2:02 AM, David Winsemius wrote: > > On Oct 3, 2013, at 3:07 PM, Mary Kindall wrote: > > > In the reproducible example given below, why I am

[R] Why 'gbm' is not giving me error when I change the response from numeric to categorical?

2013-10-04 Thread Mary Kindall
n.trees : argument of length 0 My question is, Is binarizing the response will have so much effect that it does not find anythin useful in the predictors? Thanks -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] ___

[R] How to create an ROC with three possible classes?

2013-10-02 Thread Mary Kindall
,-1],type="prob", aggregation= "average"); pred For two class case, I use to do the following but it is no longer valid for three classes. yhat <- pred[,2] y = test[, -1] plot.roc(y, yhat) Any help will be appreciated. Thanks -

[R] Which regression tree algorithm to use for large data?

2013-09-13 Thread Mary Kindall
impossible to apply rpart on my data. I am using the following rpart command: varimp = rpart(fmla, dat=tmpData, method = "class")$variable.importance Thanks -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML versi

[R] pvalue calculate

2012-07-22 Thread Mary Kindall
I have a value a=300 observation (x) = sample(1:50) How to find a p-value from this. I need to show that "a" is different fom mean(x). Thanks -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __

[R] which function/method to find agreement between two

2012-01-24 Thread Mary Kindall
Hi I have data in the following format: itemsperson1 person2 - - -- car honda,toyotahonda bikesuzuki suzuki pant Lee Levis, Lee shirt Van_housen Hollister house rented

Re: [R] ggplot- using geom_point and geom_line at the same time

2012-01-17 Thread Mary Kindall
0:07 AM, Hadley Wickham wrote: > On Mon, Jan 16, 2012 at 6:05 PM, Mary Kindall > wrote: > > Thanks for reply > > I wanted to have legend name with spaces. Right now I am using the > > following code but it produce two legends. I have to use Gimp to cut the > &

Re: [R] ggplot- using geom_point and geom_line at the same time

2012-01-16 Thread Mary Kindall
;Number of inputs') > g <- g + scale_y_continuous('Conversion time (sec.)') > > Felipe D. Carrillo > Supervisory Fishery Biologist > Department of the Interior > US Fish & Wildlife Service > California, USA > http://www.fws.gov/redbluff/rbdd_jsmp.aspx > >

[R] ggplot- using geom_point and geom_line at the same time

2012-01-16 Thread Mary Kindall
lt;- g + geom_point() g <- g + scale_x_continuous(name='Number of inputs') g <- g + scale_y_continuous('Conversion time (sec.)') g -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] ___

[R] ggplot- using geom_point and geom_line at the same time

2012-01-16 Thread Mary Kindall
Hi I am plotting line chart using ggplot and want to use geom_line and geom_point simultaneously. I get the plot but now I have two legends. None of the legend is representing the true values. I need the legend with shape and color both. Thanks > con = textConnection("inputs var1var2va

Re: [R] relative frequency plot using ggplot or other function

2012-01-12 Thread Mary Kindall
/55078149a733dd1a0b42a57faf847036.png http://had.co.nz/ggplot2/graphics/90983232ced45a93d9fbbe40afffd69a.png Thanks On Thu, Jan 12, 2012 at 12:13 PM, Justin Haynes wrote: > On Thu 12 Jan 2012 09:02:27 AM PST, Mary Kindall wrote: > >> Hi >> I have a data frame in the following form. There are two grou

[R] relative frequency plot using ggplot or other function

2012-01-12 Thread Mary Kindall
28 2 200 0.0022677303 0.02948625 3 300 0.0061182673 0.01739936 4 400 0.0152237225 0.02569902 5 500 0.0300215262 0.03639880 6 600 0.0597610250 0.07717765 Thanks -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML versi

Re: [R] mode of frequency distribution table

2012-01-08 Thread Mary Kindall
100 300 > 8 5 4 2 1 1 1 1 1 1 > #extract any range from sorted table > > t[order(as.numeric(t),decreasing = TRUE)][1:3] > x > 5 6 4 > 8 5 4 > > I hope this helps. > > Andrija > > > On Sun, Jan 8, 2012 at 1:48 PM, Mary Kindall > wrot

[R] mode of frequency distribution table

2012-01-08 Thread Mary Kindall
. Thanks. -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version 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

[R] (Edited) cbind alternate for data frames

2012-01-06 Thread Mary Kindall
,1:4] > y = table2[1:100,3:6] > > z = cbind(x,y) //hanging the machine > > write.table(z,'out.txt) > > > > -- > - > Mary Kindall > Yorktown Heights, NY > USA > > [[alternative HTML version deleted]]

[R] cbind alternate

2012-01-06 Thread Mary Kindall
:100,5] z = cbind(x,y) //hanging the machine write.table(z,'out.txt) -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

Re: [R] aggregate function

2011-12-21 Thread Mary Kindall
either of these: > > aggregate(x$case1, x$param, FUN=paste, collapse=",") > aggregate(x$case1, x[["param"]], FUN=paste, collapse=",") > > ) > > require(data.table) >>> x <- data.table(x) >>> x[ >>> >> + ,

[R] aggregate function

2011-12-21 Thread Mary Kindall
should be param case1 1 a 2 b,c,d 3 e 4 f Thanks M -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listi

[R] read.table : fill missing entry with "unAvailable" [edit]

2011-11-16 Thread Mary Kindall
read.table(DataFile, header=FALSE, fill_missing_entry = 'unAvailable') Or remove the the complete row in which the missing entry appear. thanks -- ----- Mary Kindall Yorktown Heights, NY USA -- ----- Mary Kindall Yorktown Heights, NY USA [[alternative

[R] read.table : fill missing entry with "unAvailable" [edit]

2011-11-16 Thread Mary Kindall
ader=FALSE, fill_missing_entry = 'unAvailable') 1 thanks -- ----- Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

[R] read.table : fill missing entry with "unAvailable"

2011-11-16 Thread Mary Kindall
ader=FALSE, fill_missing_entry = 'unAvailable') thanks -- ----- Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

[R] list.dir() function

2011-11-11 Thread Mary Kindall
s the directory itself which I don't want to be printed. Why it is so? Any workaround for this problem? Thanks -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __ R-help@r-project.org mai

[R] download.file

2011-11-08 Thread Mary Kindall
File, 'wget' , quiet = TRUE) != 0) { file.remove(destFile) } } thanks -- - Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] download files using ftp: avoid error

2011-09-16 Thread Mary Kindall
; Program execution continues, whether or not the download from url was > > successful. However, wget is, I believe, not available on Windows. > > > > Rgds, > > Rainer > > > > > > On Friday 16 September 2011 15:07:15 Mary Kindall wrote: > > > I am plannin

[R] download files using ftp: avoid error

2011-09-16 Thread Mary Kindall
2down[i], sep='') destfile = paste (dest, 'inDir', files2down[i], sep='/' ) download.file(url, destfile, quiet = FALSE) } It works fine as long as the file is present. When the file is not present, it exit from loop. Is there a way to continue looping if error occ

[R] installing packages systemwide

2011-08-19 Thread Mary Kindall
> install.packages("anRpackage", dep=TRUE) I did not succeed into getting them install in req folder. Any idea? -- ----- Mary Kindall Yorktown Heights, NY USA [[alternative HTML version deleted]] __ R-help@r-project.org maili

Re: [R] save and load in R

2011-06-19 Thread Mary Kindall
the output files } newnames <- paste("file", 1:numFiles, sep="") #output variables to load into for ( i in 1:numFiles) { load(file = outfilenames[i]); assign(newnames[i], dataFile) #assign into corresponding output variables; } # Regards - M On Sun,

[R] save and load in R

2011-06-19 Thread Mary Kindall
ch a way that the data is loaded into a variable that is same as the file name without extension. file1 = load (file = './file1.Rdata') file2 = load (file = './file2.Rdata') file3 = load (file = './file3.Rdata') file4 = load (file = './file4.Rdata') How can I

[R] [Resolved] combine the data frames into comma separated list.

2011-06-14 Thread Mary Kindall
7;,'z','z'), Target4 = c('xx','yy','zz','tt','uu'))); L <- list(dataframe1, dataframe2, dataframe3, dataframe4) merge.all <- function(...) merge(..., all = TRUE) Reduce(merge.all, lapply(L, function(x) aggregate(x[2], x[1], toStr

Re: [R] combine the data frames into comma separated list.

2011-06-13 Thread Mary Kindall
Superb Gabor, Though I dont know what is happening, but yes it is workin and without fail. Thanks - M On Mon, Jun 13, 2011 at 8:20 PM, Gabor Grothendieck wrote: > On Mon, Jun 13, 2011 at 5:17 PM, Mary Kindall > wrote: > > Hi R users, > > I am new to R and am trying to merge

Re: [R] combine the data frames into comma separated list.

2011-06-13 Thread Mary Kindall
=TRUE, incomparables=''), by = 'Src', all=TRUE, incomparables='') ddply(test, ~ Src , colwise(paste, .(Target1)), collapse ="," ); Thanks On Mon, Jun 13, 2011 at 7:14 PM, Dr. D. P. Kreil (Boku) < david.kr...@boku.ac.at> wrote: > ?write.csv &

Re: [R] combine the data frames into comma separated list.

2011-06-13 Thread Mary Kindall
x ccc 43 yy ddd 55 zz 66 tt 76 uu 82 aaa 94 10 4 11 4 Thanks -- M On Mon, Jun 13, 2011 at 6:35 PM, Dr. D. P. Kreil (Boku) < david.kr...@bok

[R] combine the data frames into comma separated list.

2011-06-13 Thread Mary Kindall
- 5 - -zz 6 - - tt,uu Basically I am trying to make a consolidated table. Help appreciated. Thanks M - Mary Kindall Yorktown Heights USA [[alternative HTML version

[R] combine the data frames into comma separated list.

2011-06-13 Thread Mary Kindall
- 5 - -zz 6 - - tt,uu Basically I am trying to make a consolidated table. Help appreciated. Thanks M - Mary Kindall Yorktown Heights USA [[alternative HTML version