[R] Random Forest tree labels

2018-01-04 Thread Elahe chalabi via R-help
Hi all, I have built a Random Forest using Caret package, however, I don't understand how the splits are labeled in trees. My dataset contains the frequency of the words in the speeches of the people: 'data.frame': 499 obs. of 608 variables: $ alright : num 1 0 0 0 0 0 0 1 2 1 ... $ bad :

[R] format integer numbers with leading 0

2018-01-04 Thread Marc Girondot via R-help
Dear R-er, I would like format integer number as characters with leading 0 for a fixed width, for example: 1 shoud be "01" 2 shoud be "02" 20 should be "20" Now I use: x <- c(1, 2, 20) gsub(" ", "0", format(x, width=2)) But I suspect more elegant way could be done directly with format

Re: [R] format integer numbers with leading 0

2018-01-04 Thread Lasse Kliemann
Marc Girondot via R-help writes: > I would like format integer number as characters with leading 0 for a > fixed width, for example: > > 1 shoud be "01" > 2 shoud be "02" > 20 should be "20" formatC(x, width=2, flag="0") signature.asc Description: PGP signature

Re: [R] format integer numbers with leading 0

2018-01-04 Thread David Wolfskill
On Thu, Jan 04, 2018 at 09:12:12PM +0100, Marc Girondot via R-help wrote: > Dear R-er, > > I would like format integer number as characters with leading 0 for a > fixed width, for example: > > 1 shoud be "01" > 2 shoud be "02" > 20 should be "20" > > Now I use: > > x <- c(1, 2, 20) > >

[R] format integer numbers with leading 0

2018-01-04 Thread Marc Girondot via R-help
Dear R-er, I would like format integer number as characters with leading 0 for a fixed width, for example: 1 shoud be "01" 2 shoud be "02" 20 should be "20" Now I use: x <- c(1, 2, 20) gsub(" ", "0", format(x, width=2)) But I suspect more elegant way could be done directly with format

Re: [R] HOW TO FILTER DATA

2018-01-04 Thread MacQueen, Don
Just a couple of minor comments: > help.search('read_delim') No vignettes or demos or help files found with alias or concept or title matching 'read_delim' using regular expression matching. read_delim is not part of base R; it must come from some unnamed non-base package. I'd recommend using