The whole code is as follows:
library(caret)
library(farff)
library(gbm)
library(nnet)
setwd("C:/Users/PC/Documents")
d=readARFF("myresults.arff")
index <- createDataPartition(d$results, p = .70,list = FALSE)
tr <- d[index, ]
ts <- d[-index, ]
index_2 <- createFolds(tr$results, returnTrain = TRUE, list = TRUE)
ctrl <- trainControl(method = "repeatedcv", index = index_2)
set.seed(30218)
nnet1 <- train(results~ ., data = tr,
method = "nnet",
metric = "MAE",
trControl = ctrl,
preProc = c("center", "scale",
"zv"),
tuneGrid = data.frame(decay = (1),
size = (1.3801517)))
nnet1$results
///For SVM
set.seed(30218)
svm1 <- train(results ~ ., data = tr,
method = "svmRadial",
metric = "MAE",
preProc = c("center", "scale",
"zv"),
trControl = ctrl,
tuneGrid=expand.grid(sigma = (0.5),
C = c(1.348657)))
getTrainPerf(svm1)
svm1$results
//For GBM
set.seed(30218)
gbm <- train(results ~ ., data = tr,
method = "gbm",
preProc = c("center", "scale", "zv"),
metric = "MAE",
tuneGrid = data.frame(n.trees = (200.09633523),
interaction.depth = (1),
shrinkage=(0.1), n.minobsinnode=(10)))
gbm$results
//Then the boxplot
rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm))
bwplot(rvalues, metric="MAE")
On Fri, Feb 21, 2020 at 12:16 AM Jeff Newmiller <jdnewmil at
dcn.davis.ca.us>
wrote:
> You are being way too cavalier about what packages you are using. Read the
> Posting Guide about contributed packages... this list cannot provide expert
> support for every package out there. This confusion is why you should be
> providing a reproducible example when you ask for help about R.
>
> The caret package depends on lattice and provides some overloaded versions
> of the bwplot function that do have a metric argument. I have no expertise
> with caret myself... but recommend that you supply a reproducible example
> for best luck in prompting someone to look closer.
>
> On February 20, 2020 1:31:30 PM PST, javed khan <javedbtk111 at
gmail.com>
> wrote:
> >Thanks for your reply.
> >
> >I am not using any specific package for bwplot. I just used caret, nnet
> >and
> >gbm packages.
> >
> >When I use resample (instead of resamples), it give me error message.
> >
> >metric=MAE gives the MAE values at x-axis when I used simple plots in
> >the
> >recent past.
> >
> >Best regards
> >
> >On Thu, Feb 20, 2020 at 10:29 PM Bert Gunter <bgunter.4567 at
gmail.com>
> >wrote:
> >
> >> cc the list!
> >> (which I have done here)
> >>
> >> Bert Gunter
> >>
> >> "The trouble with having an open mind is that people keep
coming
> >along and
> >> sticking things into it."
> >> -- Opus (aka Berkeley Breathed in his "Bloom County"
comic strip )
> >>
> >>
> >> On Thu, Feb 20, 2020 at 1:20 PM javed khan <javedbtk111 at
gmail.com>
> >wrote:
> >>
> >>> Thanks for your reply.
> >>>
> >>> I am not using any specific package for bwplot. I just used
caret,
> >nnet
> >>> and gbm packages.
> >>>
> >>> When I use resample (instead of resamples), it give me error
> >message.
> >>>
> >>> metric=MAE gives the MAE values at x-axis when I used simple
plots
> >in the
> >>> recent past.
> >>>
> >>> Best regards
> >>>
> >>> On Thu, Feb 20, 2020 at 10:15 PM Bert Gunter
> ><bgunter.4567 at gmail.com>
> >>> wrote:
> >>>
> >>>> ??
> >>>> Isn't is resample() not resamples()?
> >>>> From what package?
> >>>> What package is bwplot from? lattice:::bwplot has no
"metric"
> >argument.
> >>>>
> >>>>
> >>>>
> >>>> Bert Gunter
> >>>>
> >>>> "The trouble with having an open mind is that people
keep coming
> >along
> >>>> and sticking things into it."
> >>>> -- Opus (aka Berkeley Breathed in his "Bloom
County" comic strip )
> >>>>
> >>>>
> >>>> On Thu, Feb 20, 2020 at 12:55 PM javed khan
<javedbtk111 at gmail.com>
> >>>> wrote:
> >>>>
> >>>>> Hello to all
> >>>>>
> >>>>> I have different train functions for NN, SVM and GBM
and when I
> >combine
> >>>>> the
> >>>>> results using bwplot, it gives me the error "
Different number of
> >>>>> resamples
> >>>>> in each model". It gives me the results (MAE
values) but using the
> >>>>> boxplot,
> >>>>> it gives the error. The code is as follows:
> >>>>>
> >>>>> set.seed(30218)
> >>>>> nnet1 <- train(results~ ., data = tr,
> >>>>> method = "nnet",
> >>>>>
> >>>>> metric = "MAE",
> >>>>> trControl = ctrl,
> >>>>>
> >>>>> preProc = c("center",
"scale", "zv"),
> >>>>> tuneGrid = data.frame(decay = (1),
> >>>>> size =
(1.3801517)))
> >>>>> nnet1$results
> >>>>>
> >>>>> ///For SVM
> >>>>>
> >>>>> set.seed(30218)
> >>>>> svm1 <- train(results ~ ., data = tr,
> >>>>> method = "svmRadial",
> >>>>>
> >>>>> metric = "MAE",
> >>>>> preProc = c("center",
"scale", "zv"),
> >>>>> trControl = ctrl,
> >>>>> tuneGrid=expand.grid(sigma = (0.5),
> >>>>> C =
c(1.348657)))
> >>>>> getTrainPerf(svm1)
> >>>>> svm1$results
> >>>>>
> >>>>> //For GBM
> >>>>>
> >>>>> set.seed(30218)
> >>>>> gbm <- train(results ~ ., data = tr,
> >>>>> method = "gbm",
> >>>>> preProc = c("center",
"scale", "zv"),
> >>>>> metric = "MAE",
> >>>>>
> >>>>>
> >>>>> tuneGrid = data.frame(n.trees =
(200.09633523),
> >>>>> interaction.depth = (1),
> >>>>> shrinkage=(0.1),
> >>>>> n.minobsinnode=(10)))
> >>>>> gbm$results
> >>>>>
> >>>>> //Then the boxplot
> >>>>>
> >>>>> rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm))
> >>>>>
> >>>>> bwplot(rvalues, metric="MAE")
> >>>>>
> >>>>> [[alternative HTML version deleted]]
> >>>>>
> >>>>> ______________________________________________
> >>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE
and more, see
> >>>>> 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.
> >>>>>
> >>>>
> >
> > [[alternative HTML version deleted]]
> >
> >______________________________________________
> >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> >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.
>
> --
> Sent from my phone. Please excuse my brevity.
>
[[alternative HTML version deleted]]
When I do not include gbm in the boxplot, it gives me the result for nnet and svm but when I include also gbm, it gives the error message There are different numbers of resamples in each model On Fri, Feb 21, 2020 at 10:00 AM javed khan <javedbtk111 at gmail.com> wrote:> The whole code is as follows: > > library(caret) > library(farff) > library(gbm) > library(nnet) > > setwd("C:/Users/PC/Documents") > d=readARFF("myresults.arff") > > index <- createDataPartition(d$results, p = .70,list = FALSE) > tr <- d[index, ] > ts <- d[-index, ] > index_2 <- createFolds(tr$results, returnTrain = TRUE, list = TRUE) > ctrl <- trainControl(method = "repeatedcv", index = index_2) > > set.seed(30218) > nnet1 <- train(results~ ., data = tr, > method = "nnet", > > metric = "MAE", > trControl = ctrl, > > preProc = c("center", "scale", "zv"), > tuneGrid = data.frame(decay = (1), > size = (1.3801517))) > nnet1$results > > ///For SVM > > set.seed(30218) > svm1 <- train(results ~ ., data = tr, > method = "svmRadial", > > metric = "MAE", > preProc = c("center", "scale", "zv"), > trControl = ctrl, > tuneGrid=expand.grid(sigma = (0.5), > C = c(1.348657))) > getTrainPerf(svm1) > svm1$results > > //For GBM > > set.seed(30218) > gbm <- train(results ~ ., data = tr, > method = "gbm", > preProc = c("center", "scale", "zv"), > metric = "MAE", > > > tuneGrid = data.frame(n.trees = (200.09633523), > interaction.depth = (1), > shrinkage=(0.1), n.minobsinnode=(10))) > gbm$results > > //Then the boxplot > > rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm)) > > bwplot(rvalues, metric="MAE") > > > On Fri, Feb 21, 2020 at 12:16 AM Jeff Newmiller <jdnewmil at dcn.davis.ca.us> > wrote: > >> You are being way too cavalier about what packages you are using. Read >> the Posting Guide about contributed packages... this list cannot provide >> expert support for every package out there. This confusion is why you >> should be providing a reproducible example when you ask for help about R. >> >> The caret package depends on lattice and provides some overloaded >> versions of the bwplot function that do have a metric argument. I have no >> expertise with caret myself... but recommend that you supply a reproducible >> example for best luck in prompting someone to look closer. >> >> On February 20, 2020 1:31:30 PM PST, javed khan <javedbtk111 at gmail.com> >> wrote: >> >Thanks for your reply. >> > >> >I am not using any specific package for bwplot. I just used caret, nnet >> >and >> >gbm packages. >> > >> >When I use resample (instead of resamples), it give me error message. >> > >> >metric=MAE gives the MAE values at x-axis when I used simple plots in >> >the >> >recent past. >> > >> >Best regards >> > >> >On Thu, Feb 20, 2020 at 10:29 PM Bert Gunter <bgunter.4567 at gmail.com> >> >wrote: >> > >> >> cc the list! >> >> (which I have done here) >> >> >> >> Bert Gunter >> >> >> >> "The trouble with having an open mind is that people keep coming >> >along and >> >> sticking things into it." >> >> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) >> >> >> >> >> >> On Thu, Feb 20, 2020 at 1:20 PM javed khan <javedbtk111 at gmail.com> >> >wrote: >> >> >> >>> Thanks for your reply. >> >>> >> >>> I am not using any specific package for bwplot. I just used caret, >> >nnet >> >>> and gbm packages. >> >>> >> >>> When I use resample (instead of resamples), it give me error >> >message. >> >>> >> >>> metric=MAE gives the MAE values at x-axis when I used simple plots >> >in the >> >>> recent past. >> >>> >> >>> Best regards >> >>> >> >>> On Thu, Feb 20, 2020 at 10:15 PM Bert Gunter >> ><bgunter.4567 at gmail.com> >> >>> wrote: >> >>> >> >>>> ?? >> >>>> Isn't is resample() not resamples()? >> >>>> From what package? >> >>>> What package is bwplot from? lattice:::bwplot has no "metric" >> >argument. >> >>>> >> >>>> >> >>>> >> >>>> Bert Gunter >> >>>> >> >>>> "The trouble with having an open mind is that people keep coming >> >along >> >>>> and sticking things into it." >> >>>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) >> >>>> >> >>>> >> >>>> On Thu, Feb 20, 2020 at 12:55 PM javed khan <javedbtk111 at gmail.com> >> >>>> wrote: >> >>>> >> >>>>> Hello to all >> >>>>> >> >>>>> I have different train functions for NN, SVM and GBM and when I >> >combine >> >>>>> the >> >>>>> results using bwplot, it gives me the error " Different number of >> >>>>> resamples >> >>>>> in each model". It gives me the results (MAE values) but using the >> >>>>> boxplot, >> >>>>> it gives the error. The code is as follows: >> >>>>> >> >>>>> set.seed(30218) >> >>>>> nnet1 <- train(results~ ., data = tr, >> >>>>> method = "nnet", >> >>>>> >> >>>>> metric = "MAE", >> >>>>> trControl = ctrl, >> >>>>> >> >>>>> preProc = c("center", "scale", "zv"), >> >>>>> tuneGrid = data.frame(decay = (1), >> >>>>> size = (1.3801517))) >> >>>>> nnet1$results >> >>>>> >> >>>>> ///For SVM >> >>>>> >> >>>>> set.seed(30218) >> >>>>> svm1 <- train(results ~ ., data = tr, >> >>>>> method = "svmRadial", >> >>>>> >> >>>>> metric = "MAE", >> >>>>> preProc = c("center", "scale", "zv"), >> >>>>> trControl = ctrl, >> >>>>> tuneGrid=expand.grid(sigma = (0.5), >> >>>>> C = c(1.348657))) >> >>>>> getTrainPerf(svm1) >> >>>>> svm1$results >> >>>>> >> >>>>> //For GBM >> >>>>> >> >>>>> set.seed(30218) >> >>>>> gbm <- train(results ~ ., data = tr, >> >>>>> method = "gbm", >> >>>>> preProc = c("center", "scale", "zv"), >> >>>>> metric = "MAE", >> >>>>> >> >>>>> >> >>>>> tuneGrid = data.frame(n.trees = (200.09633523), >> >>>>> interaction.depth = (1), >> >>>>> shrinkage=(0.1), >> >>>>> n.minobsinnode=(10))) >> >>>>> gbm$results >> >>>>> >> >>>>> //Then the boxplot >> >>>>> >> >>>>> rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm)) >> >>>>> >> >>>>> bwplot(rvalues, metric="MAE") >> >>>>> >> >>>>> [[alternative HTML version deleted]] >> >>>>> >> >>>>> ______________________________________________ >> >>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> >>>>> 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. >> >>>>> >> >>>> >> > >> > [[alternative HTML version deleted]] >> > >> >______________________________________________ >> >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> >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. >> >> -- >> Sent from my phone. Please excuse my brevity. >> >[[alternative HTML version deleted]]
Hi your code is not reproducible. I get error with> setwd("C:/Users/PC/Documents")Error in setwd("C:/Users/PC/Documents") : cannot change working directory>so probably any other line of your code gives me error too. Use dput(d) or dput(head(d)) to provide your data Cheers Petr> -----Original Message----- > From: R-help <r-help-bounces at r-project.org> On Behalf Of javed khan > Sent: Friday, February 21, 2020 10:00 AM > To: Jeff Newmiller <jdnewmil at dcn.davis.ca.us> > Cc: R-help <r-help at r-project.org> > Subject: Re: [R] Different number of resamples error > > The whole code is as follows: > > library(caret) > library(farff) > library(gbm) > library(nnet) > > setwd("C:/Users/PC/Documents") > d=readARFF("myresults.arff") > > index <- createDataPartition(d$results, p = .70,list = FALSE) tr <-d[index, ] ts <-> d[-index, ] > index_2 <- createFolds(tr$results, returnTrain = TRUE, list = TRUE) ctrl<-> trainControl(method = "repeatedcv", index = index_2) > > set.seed(30218) > nnet1 <- train(results~ ., data = tr, > method = "nnet", > > metric = "MAE", > trControl = ctrl, > > preProc = c("center", "scale", "zv"), > tuneGrid = data.frame(decay = (1), > size = (1.3801517))) nnet1$results > > ///For SVM > > set.seed(30218) > svm1 <- train(results ~ ., data = tr, > method = "svmRadial", > > metric = "MAE", > preProc = c("center", "scale", "zv"), > trControl = ctrl, > tuneGrid=expand.grid(sigma = (0.5), > C = c(1.348657))) > getTrainPerf(svm1) > svm1$results > > //For GBM > > set.seed(30218) > gbm <- train(results ~ ., data = tr, > method = "gbm", > preProc = c("center", "scale", "zv"), > metric = "MAE", > > > tuneGrid = data.frame(n.trees = (200.09633523),interaction.depth > (1),> shrinkage=(0.1), n.minobsinnode=(10)))gbm$results> > //Then the boxplot > > rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm)) > > bwplot(rvalues, metric="MAE") > > > On Fri, Feb 21, 2020 at 12:16 AM Jeff Newmiller <jdnewmil at dcn.davis.ca.us> > wrote: > > > You are being way too cavalier about what packages you are using. Read > > the Posting Guide about contributed packages... this list cannot > > provide expert support for every package out there. This confusion is > > why you should be providing a reproducible example when you ask for help > about R. > > > > The caret package depends on lattice and provides some overloaded > > versions of the bwplot function that do have a metric argument. I have > > no expertise with caret myself... but recommend that you supply a > > reproducible example for best luck in prompting someone to look closer. > > > > On February 20, 2020 1:31:30 PM PST, javed khan > > <javedbtk111 at gmail.com> > > wrote: > > >Thanks for your reply. > > > > > >I am not using any specific package for bwplot. I just used caret, > > >nnet and gbm packages. > > > > > >When I use resample (instead of resamples), it give me error message. > > > > > >metric=MAE gives the MAE values at x-axis when I used simple plots in > > >the recent past. > > > > > >Best regards > > > > > >On Thu, Feb 20, 2020 at 10:29 PM Bert Gunter <bgunter.4567 at gmail.com> > > >wrote: > > > > > >> cc the list! > > >> (which I have done here) > > >> > > >> Bert Gunter > > >> > > >> "The trouble with having an open mind is that people keep coming > > >along and > > >> sticking things into it." > > >> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > >> > > >> > > >> On Thu, Feb 20, 2020 at 1:20 PM javed khan <javedbtk111 at gmail.com> > > >wrote: > > >> > > >>> Thanks for your reply. > > >>> > > >>> I am not using any specific package for bwplot. I just used caret, > > >nnet > > >>> and gbm packages. > > >>> > > >>> When I use resample (instead of resamples), it give me error > > >message. > > >>> > > >>> metric=MAE gives the MAE values at x-axis when I used simple plots > > >in the > > >>> recent past. > > >>> > > >>> Best regards > > >>> > > >>> On Thu, Feb 20, 2020 at 10:15 PM Bert Gunter > > ><bgunter.4567 at gmail.com> > > >>> wrote: > > >>> > > >>>> ?? > > >>>> Isn't is resample() not resamples()? > > >>>> From what package? > > >>>> What package is bwplot from? lattice:::bwplot has no "metric" > > >argument. > > >>>> > > >>>> > > >>>> > > >>>> Bert Gunter > > >>>> > > >>>> "The trouble with having an open mind is that people keep coming > > >along > > >>>> and sticking things into it." > > >>>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip > > >>>> ) > > >>>> > > >>>> > > >>>> On Thu, Feb 20, 2020 at 12:55 PM javed khan > > >>>> <javedbtk111 at gmail.com> > > >>>> wrote: > > >>>> > > >>>>> Hello to all > > >>>>> > > >>>>> I have different train functions for NN, SVM and GBM and when I > > >combine > > >>>>> the > > >>>>> results using bwplot, it gives me the error " Different number > > >>>>> of resamples in each model". It gives me the results (MAE > > >>>>> values) but using the boxplot, it gives the error. The code is > > >>>>> as follows: > > >>>>> > > >>>>> set.seed(30218) > > >>>>> nnet1 <- train(results~ ., data = tr, > > >>>>> method = "nnet", > > >>>>> > > >>>>> metric = "MAE", > > >>>>> trControl = ctrl, > > >>>>> > > >>>>> preProc = c("center", "scale", "zv"), > > >>>>> tuneGrid = data.frame(decay = (1), > > >>>>> size = (1.3801517))) > > >>>>> nnet1$results > > >>>>> > > >>>>> ///For SVM > > >>>>> > > >>>>> set.seed(30218) > > >>>>> svm1 <- train(results ~ ., data = tr, > > >>>>> method = "svmRadial", > > >>>>> > > >>>>> metric = "MAE", > > >>>>> preProc = c("center", "scale", "zv"), > > >>>>> trControl = ctrl, > > >>>>> tuneGrid=expand.grid(sigma = (0.5), > > >>>>> C > > >>>>> c(1.348657))) > > >>>>> getTrainPerf(svm1) > > >>>>> svm1$results > > >>>>> > > >>>>> //For GBM > > >>>>> > > >>>>> set.seed(30218) > > >>>>> gbm <- train(results ~ ., data = tr, > > >>>>> method = "gbm", > > >>>>> preProc = c("center", "scale", "zv"), > > >>>>> metric = "MAE", > > >>>>> > > >>>>> > > >>>>> tuneGrid = data.frame(n.trees = (200.09633523), > > >>>>> interaction.depth = (1), > > >>>>> shrinkage=(0.1), > > >>>>> n.minobsinnode=(10))) > > >>>>> gbm$results > > >>>>> > > >>>>> //Then the boxplot > > >>>>> > > >>>>> rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm)) > > >>>>> > > >>>>> bwplot(rvalues, metric="MAE") > > >>>>> > > >>>>> [[alternative HTML version deleted]] > > >>>>> > > >>>>> ______________________________________________ > > >>>>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, > > >>>>> see 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. > > >>>>> > > >>>> > > > > > > [[alternative HTML version deleted]] > > > > > >______________________________________________ > > >R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > >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. > > > > -- > > Sent from my phone. Please excuse my brevity. > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code.
structure(list(recordnumber = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
75, 76, 77, 78, 79, 80, 81, 82, 84, 89, 91, 92, 93, 94, 97, 98,
99, 100, 101), projectname = structure(c(1L, 1L, 1L, 1L, 1L,
1L, 1L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 5L, 6L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 7L, 7L, 1L, 6L, 6L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 5L, 5L, 7L, 7L, 8L,
8L, 8L, 8L, 3L, 8L, 4L, 4L, 4L), .Label = c("de", "erb",
"gal",
"X", "hst", "slp", "spl",
"Y"), class = "factor"), cat2 = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L, 8L,
8L, 8L, 8L, 3L, 3L, 13L, 9L, 9L, 9L, 11L, 11L, 11L, 5L, 4L, 6L,
8L, 3L, 3L, 9L, 9L, 9L, 9L, 9L, 6L, 7L, 2L, 2L, 3L, 3L, 8L, 8L,
8L, 13L, 13L, 13L, 8L, 8L, 14L, 6L, 4L, 3L, 10L, 10L, 10L, 14L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 10L,
8L, 8L, 1L, 1L, 1L, 1L, 1L, 12L, 1L, 1L, 1L, 1L, 1L, 1L, 12L), .Label
c("Avionics",
"application_ground", "avionicsmonitoring",
"batchdataprocessing",
"communications", "datacapture",
"launchprocessing", "missionplanning",
"monitor_control", "operatingsystem",
"realdataprocessing", "science",
"simulation", "utility"), class = "factor"), forg
= structure(c(2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("f",
"g"), class = "factor"), center = structure(c(2L, 2L, 2L,
2L,
2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 6L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 2L, 2L, 2L, 6L, 6L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 2L, 2L, 3L, 3L,
5L, 5L, 5L, 5L, 5L, 5L, 2L, 2L, 2L), .Label = c("1", "2",
"3",
"4", "5", "6"), class = "factor"), year
= c(1979, 1979, 1979,
1979, 1979, 1979, 1979, 1982, 1980, 1980, 1984, 1980, 1985, 1980,
1983, 1982, 1980, 1984, 1983, 1984, 1985, 1985, 1985, 1986, 1986,
1986, 1982, 1982, 1982, 1982, 1982, 1982, 1985, 1987, 1987, 1986,
1986, 1986, 1986, 1986, 1980, 1975, 1982, 1982, 1982, 1977, 1977,
1984, 1980, 1983, 1984, 1985, 1979, 1979, 1979, 1979, 1977, 1979,
1974, 1975, 1976, 1979, 1971, 1980, 1979, 1977, 1976, 1983, 1978,
1979, 1979, 1979, 1979, 1982, 1978, 1978, 1978, 1979, 1984, 1984,
1980, 1980, 1977, 1977, 1977, 1977, 1977, 1977, 1982, 1980, 1983,
1983, 1983), mode = structure(c(3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L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, 4L, 2L, 4L, 3L, 3L, 3L), .Label = c("vl",
"l",
"n", "h", "vh", "xh"), class =
"factor"), cplx = structure(c(4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 3L, 4L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 2L, 2L, 3L, 3L, 3L, 4L, 6L,
4L, 4L, 4L, 5L, 4L, 4L, 4L, 5L, 4L, 6L, 4L, 6L, 6L, 3L, 3L, 4L,
4L, 4L, 2L, 4L, 3L, 4L, 4L, 4L, 3L, 3L, 4L, 5L, 5L, 5L, 5L, 5L,
4L, 5L, 5L, 5L, 5L, 5L, 6L, 5L, 5L, 5L, 5L, 5L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), time = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 6L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 4L, 3L, 3L, 5L, 5L, 5L, 5L, 5L, 5L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 4L, 5L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L,
5L, 5L, 5L, 4L, 4L, 4L, 5L, 3L, 3L, 6L, 3L, 4L, 4L, 3L, 3L, 4L,
4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 6L,
5L, 5L, 5L, 6L, 6L, 6L, 6L, 5L, 6L, 5L, 5L, 5L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), stor = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 6L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 6L,
3L, 3L, 6L, 3L, 3L, 3L, 3L, 3L, 3L, 5L, 5L, 5L, 5L, 5L, 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, 4L,
4L, 3L, 3L, 3L, 3L, 2L, 3L, 2L, 3L, 4L, 4L, 4L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), acap = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 5L, 5L, 5L, 5L, 5L, 5L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 3L, 4L, 4L, 3L, 4L, 4L, 4L, 3L,
4L, 4L, 4L, 4L, 3L, 3L, 5L, 4L, 3L, 4L, 5L, 4L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L,
4L, 5L, 5L, 4L, 4L, 4L, 4L, 4L, 4L, 3L, 3L, 3L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), aexp = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 5L, 5L, 5L, 5L, 4L, 5L, 3L, 5L,
4L, 5L, 4L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 5L, 4L, 4L,
4L, 4L, 4L, 3L, 4L, 4L, 5L, 3L, 3L, 5L, 3L, 3L, 3L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L, 3L, 3L,
4L, 5L, 5L, 4L, 4L, 4L, 4L, 2L, 4L, 3L, 3L, 3L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), pcap = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 5L, 4L, 5L, 3L, 4L, 4L, 3L, 5L,
4L, 4L, 3L, 3L, 3L, 3L, 4L,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 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 2L,
4L, 1L, 1L, 4L, 4L, 4L, 4L, 2L, 4L, 2L, 2L, 2L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), modp = structure(c(4L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 4L, 4L, 4L, 3L, 3L, 3L, 5L, 5L, 5L, 5L, 5L, 5L, 4L,
4L, 4L, 3L, 3L, 4L, 3L, 3L, 4L, 4L, 4L, 4L, 3L, 2L, 4L, 4L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 4L, 4L, 4L, 1L, 3L, 4L, 4L, 3L, 3L, 3L,
3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 4L, 4L, 3L,
4L, 4L, 4L, 4L, 4L, 4L, 4L, 2L, 4L, 3L, 3L, 3L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), tool = structure(c(3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 5L, 5L, 5L, 5L, 5L, 5L, 3L,
3L, 3L, 3L, 3L, 4L, 3L, 3L, 3L, 1L, 4L, 3L, 3L, 2L, 3L, 3L, 4L,
2L, 2L, 2L, 5L, 5L, 5L, 4L, 3L, 3L, 1L, 2L, 4L, 4L, 2L, 2L, 3L,
1L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 5L, 5L, 3L,
3L, 4L, 4L, 3L, 3L, 3L, 3L, 4L, 3L, 3L, 3L, 3L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), sced = structure(c(2L,
2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 2L, 2L, 2L, 3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2L, 2L, 3L, 3L, 3L, 3L, 3L, 2L, 3L, 3L, 3L, 3L, 4L, 3L, 4L, 3L,
4L, 4L, 4L, 4L, 3L, 3L, 2L, 2L, 2L, 4L, 3L, 3L, 3L, 3L, 3L, 3L,
3L, 3L, 3L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 4L, 4L, 4L,
3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), .Label = c("vl",
"l", "n", "h", "vh", "xh"),
class = "factor"), equivphyskloc = c(25.9,
24.6, 7.7, 8.2, 9.7, 2.2, 3.5, 66.6, 7.5, 20, 6, 100, 11.3, 100,
20, 100, 150, 31.5, 15, 32.5, 19.7, 66.6, 29.5, 15, 38, 10, 15.4,
48.5, 16.3, 12.8, 32.6, 35.5, 5.5, 10.4, 14, 6.5, 13, 90, 8,
16, 177.9, 302, 282.1, 284.7, 79, 423, 190, 47.5, 21, 78, 11.4,
19.3, 101, 219, 50, 227, 70, 0.9, 980, 350, 70, 271, 90, 40,
137, 150, 339, 240, 144, 151, 34, 98, 85, 20, 111, 162, 352,
165, 60, 100, 32, 53, 41, 24, 165, 65, 70, 50, 7.25, 233, 16.3,
6.2, 3), act_effort = c(117.6, 117.6, 31.2, 36, 25.2, 8.4, 10.8,
352.8, 72, 72, 24, 360, 36, 215, 48, 360, 324, 60, 48, 60, 60,
300, 120, 90, 210, 48, 70, 239, 82, 62, 170, 192, 18, 50, 60,
42, 60, 444, 42, 114, 1248, 2400, 1368, 973, 400, 2400, 420,
252, 107, 571.4, 98.8, 155, 750, 2120, 370, 1181, 278, 8.4, 4560,
720, 458, 2460, 162, 150, 636, 882, 444, 192, 576, 432, 72, 300,
300, 240, 600, 756, 1200, 97, 409, 703, 1350, 480, 599, 430,
4178.2, 1772.5, 1645.9, 1924.5, 648, 8211, 480, 12, 38)), row.names = c(NA,
-93L), class = "data.frame")
On Fri, Feb 21, 2020 at 10:06 AM PIKAL Petr <petr.pikal at precheza.cz>
wrote:
> Hi
>
> your code is not reproducible.
>
> I get error with
>
> > setwd("C:/Users/PC/Documents")
> Error in setwd("C:/Users/PC/Documents") : cannot change working
directory
> >
>
> so probably any other line of your code gives me error too.
>
> Use dput(d) or dput(head(d)) to provide your data
>
> Cheers
> Petr
>
> > -----Original Message-----
> > From: R-help <r-help-bounces at r-project.org> On Behalf Of
javed khan
> > Sent: Friday, February 21, 2020 10:00 AM
> > To: Jeff Newmiller <jdnewmil at dcn.davis.ca.us>
> > Cc: R-help <r-help at r-project.org>
> > Subject: Re: [R] Different number of resamples error
> >
> > The whole code is as follows:
> >
> > library(caret)
> > library(farff)
> > library(gbm)
> > library(nnet)
> >
> > setwd("C:/Users/PC/Documents")
> > d=readARFF("myresults.arff")
> >
> > index <- createDataPartition(d$results, p = .70,list = FALSE) tr
<-
> d[index, ] ts <-
> > d[-index, ]
> > index_2 <- createFolds(tr$results, returnTrain = TRUE, list = TRUE)
ctrl
> <-
> > trainControl(method = "repeatedcv", index = index_2)
> >
> > set.seed(30218)
> > nnet1 <- train(results~ ., data = tr,
> > method = "nnet",
> >
> > metric = "MAE",
> > trControl = ctrl,
> >
> > preProc = c("center", "scale",
"zv"),
> > tuneGrid = data.frame(decay = (1),
> > size = (1.3801517)))
nnet1$results
> >
> > ///For SVM
> >
> > set.seed(30218)
> > svm1 <- train(results ~ ., data = tr,
> > method = "svmRadial",
> >
> > metric = "MAE",
> > preProc = c("center", "scale",
"zv"),
> > trControl = ctrl,
> > tuneGrid=expand.grid(sigma = (0.5),
> > C = c(1.348657)))
> > getTrainPerf(svm1)
> > svm1$results
> >
> > //For GBM
> >
> > set.seed(30218)
> > gbm <- train(results ~ ., data = tr,
> > method = "gbm",
> > preProc = c("center", "scale",
"zv"),
> > metric = "MAE",
> >
> >
> > tuneGrid = data.frame(n.trees = (200.09633523),
> interaction.depth > > (1),
> > shrinkage=(0.1),
n.minobsinnode=(10)))
> gbm$results
> >
> > //Then the boxplot
> >
> > rvalues=resamples(list(nnet=nnet1, svm=svm1, GBM=gbm))
> >
> > bwplot(rvalues, metric="MAE")
> >
> >
> > On Fri, Feb 21, 2020 at 12:16 AM Jeff Newmiller <
> jdnewmil at dcn.davis.ca.us>
> > wrote:
> >
> > > You are being way too cavalier about what packages you are using.
Read
> > > the Posting Guide about contributed packages... this list cannot
> > > provide expert support for every package out there. This
confusion is
> > > why you should be providing a reproducible example when you ask
for
> help
> > about R.
> > >
> > > The caret package depends on lattice and provides some overloaded
> > > versions of the bwplot function that do have a metric argument. I
have
> > > no expertise with caret myself... but recommend that you supply a
> > > reproducible example for best luck in prompting someone to look
closer.
> > >
> > > On February 20, 2020 1:31:30 PM PST, javed khan
> > > <javedbtk111 at gmail.com>
> > > wrote:
> > > >Thanks for your reply.
> > > >
> > > >I am not using any specific package for bwplot. I just used
caret,
> > > >nnet and gbm packages.
> > > >
> > > >When I use resample (instead of resamples), it give me error
message.
> > > >
> > > >metric=MAE gives the MAE values at x-axis when I used simple
plots in
> > > >the recent past.
> > > >
> > > >Best regards
> > > >
> > > >On Thu, Feb 20, 2020 at 10:29 PM Bert Gunter <bgunter.4567
at gmail.com>
> > > >wrote:
> > > >
> > > >> cc the list!
> > > >> (which I have done here)
> > > >>
> > > >> Bert Gunter
> > > >>
> > > >> "The trouble with having an open mind is that
people keep coming
> > > >along and
> > > >> sticking things into it."
> > > >> -- Opus (aka Berkeley Breathed in his "Bloom
County" comic strip )
> > > >>
> > > >>
> > > >> On Thu, Feb 20, 2020 at 1:20 PM javed khan
<javedbtk111 at gmail.com>
> > > >wrote:
> > > >>
> > > >>> Thanks for your reply.
> > > >>>
> > > >>> I am not using any specific package for bwplot. I
just used caret,
> > > >nnet
> > > >>> and gbm packages.
> > > >>>
> > > >>> When I use resample (instead of resamples), it give
me error
> > > >message.
> > > >>>
> > > >>> metric=MAE gives the MAE values at x-axis when I
used simple plots
> > > >in the
> > > >>> recent past.
> > > >>>
> > > >>> Best regards
> > > >>>
> > > >>> On Thu, Feb 20, 2020 at 10:15 PM Bert Gunter
> > > ><bgunter.4567 at gmail.com>
> > > >>> wrote:
> > > >>>
> > > >>>> ??
> > > >>>> Isn't is resample() not resamples()?
> > > >>>> From what package?
> > > >>>> What package is bwplot from? lattice:::bwplot
has no "metric"
> > > >argument.
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>> Bert Gunter
> > > >>>>
> > > >>>> "The trouble with having an open mind is
that people keep coming
> > > >along
> > > >>>> and sticking things into it."
> > > >>>> -- Opus (aka Berkeley Breathed in his
"Bloom County" comic strip
> > > >>>> )
> > > >>>>
> > > >>>>
> > > >>>> On Thu, Feb 20, 2020 at 12:55 PM javed khan
> > > >>>> <javedbtk111 at gmail.com>
> > > >>>> wrote:
> > > >>>>
> > > >>>>> Hello to all
> > > >>>>>
> > > >>>>> I have different train functions for NN, SVM
and GBM and when I
> > > >combine
> > > >>>>> the
> > > >>>>> results using bwplot, it gives me the error
" Different number
> > > >>>>> of resamples in each model". It gives
me the results (MAE
> > > >>>>> values) but using the boxplot, it gives the
error. The code is
> > > >>>>> as follows:
> > > >>>>>
> > > >>>>> set.seed(30218)
> > > >>>>> nnet1 <- train(results~ ., data = tr,
> > > >>>>> method = "nnet",
> > > >>>>>
> > > >>>>> metric = "MAE",
> > > >>>>> trControl = ctrl,
> > > >>>>>
> > > >>>>> preProc =
c("center", "scale", "zv"),
> > > >>>>> tuneGrid = data.frame(decay
= (1),
> > > >>>>> size =
(1.3801517)))
> > > >>>>> nnet1$results
> > > >>>>>
> > > >>>>> ///For SVM
> > > >>>>>
> > > >>>>> set.seed(30218)
> > > >>>>> svm1 <- train(results ~ ., data = tr,
> > > >>>>> method =
"svmRadial",
> > > >>>>>
> > > >>>>> metric =
"MAE",
> > > >>>>> preProc =
c("center", "scale", "zv"),
> > > >>>>> trControl = ctrl,
> > > >>>>> tuneGrid=expand.grid(sigma =
(0.5),
> > > >>>>>
C > > > >>>>> c(1.348657)))
> > > >>>>> getTrainPerf(svm1)
> > > >>>>> svm1$results
> > > >>>>>
> > > >>>>> //For GBM
> > > >>>>>
> > > >>>>> set.seed(30218)
> > > >>>>> gbm <- train(results ~ ., data = tr,
> > > >>>>> method = "gbm",
> > > >>>>> preProc = c("center",
"scale", "zv"),
> > > >>>>> metric = "MAE",
> > > >>>>>
> > > >>>>>
> > > >>>>> tuneGrid = data.frame(n.trees =
(200.09633523),
> > > >>>>> interaction.depth = (1),
> > > >>>>>
shrinkage=(0.1),
> > > >>>>> n.minobsinnode=(10)))
> > > >>>>> gbm$results
> > > >>>>>
> > > >>>>> //Then the boxplot
> > > >>>>>
> > > >>>>> rvalues=resamples(list(nnet=nnet1, svm=svm1,
GBM=gbm))
> > > >>>>>
> > > >>>>> bwplot(rvalues, metric="MAE")
> > > >>>>>
> > > >>>>> [[alternative HTML version deleted]]
> > > >>>>>
> > > >>>>>
______________________________________________
> > > >>>>> R-help at r-project.org mailing list -- To
UNSUBSCRIBE and more,
> > > >>>>> see
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.
> > > >>>>>
> > > >>>>
> > > >
> > > > [[alternative HTML version deleted]]
> > > >
> > > >______________________________________________
> > > >R-help at r-project.org mailing list -- To UNSUBSCRIBE and
more, see
> > > >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.
> > >
> > > --
> > > Sent from my phone. Please excuse my brevity.
> > >
> >
> > [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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.
>
[[alternative HTML version deleted]]