Re: [R] Package Caret

2023-04-16 Thread Gábor Malomsoki
Many thanks Bert, now is ok, i did not know that "Namensraum" should  mean
a package

Am So., 16. Apr. 2023 um 23:44 Uhr schrieb Bert Gunter <
bgunter.4...@gmail.com>:

> So update the vctrs package to the latest version first before loading
> R-tools (or the caret package, specifically)?
>
> -- Bert
>
> On Sun, Apr 16, 2023 at 1:57 PM Gábor Malomsoki
>  wrote:
> >
> > I have newly installed R, R-tools, RStudio, but still not working:
> >
> > library(caret)Lade nötiges Paket: latticeError: Laden von Paket oder
> > Namensraum für ‘caret’ in loadNamespace(i, c(lib.loc, .libPaths()),
> > versionCheck = vI[[i]]): fehlgeschlagen
> >  Namensraum ‘vctrs’ 0.5.2 ist bereits geladen, aber >= 0.6.0 wird
> gefordert
> >
> >
> > Error in createDataPartition(hypotezis_df$X, p = 0.75, list = FALSE,
> > times = 1) :
> >   could not find function "createDataPartition"
> >
> >
> > R version 4.2.3 (2023-03-15 ucrt)
> > Platform: x86_64-w64-mingw32/x64 (64-bit)
> > Running under: Windows 10 x64 (build 19044)
> >
> > Matrix products: default
> >
> > locale:
> > [1] LC_COLLATE=German_Austria.utf8  LC_CTYPE=German_Austria.utf8
> > [3] LC_MONETARY=German_Austria.utf8 LC_NUMERIC=C
> > [5] LC_TIME=German_Austria.utf8
> >
> > attached base packages:
> > [1] stats graphics  grDevices utils datasets  methods   base
> >
> > other attached packages:
> >  [1] plotrix_3.8-2rgl_1.1.3scatterplot3d_0.3-43
> > lattice_0.20-45
> >  [5] knitr_1.42   GGally_2.1.2 fs_1.6.0
> > lubridate_1.9.2
> >  [9] forcats_1.0.0stringr_1.5.0dplyr_1.1.0
> > purrr_1.0.1
> > [13] readr_2.1.4  tidyr_1.3.0  tibble_3.1.8
> > ggplot2_3.4.2
> > [17] tidyverse_2.0.0
> >
> > loaded via a namespace (and not attached):
> >  [1] progress_1.2.2 tidyselect_1.2.0   xfun_0.36
> colorspace_2.1-0
> >  [5] vctrs_0.5.2generics_0.1.3 htmltools_0.5.4
> base64enc_0.1-3
> >  [9] utf8_1.2.2 rlang_1.1.0pillar_1.8.1   glue_1.6.2
> > [13] withr_2.5.0RColorBrewer_1.1-3 foreach_1.5.2
> lifecycle_1.0.3
> > [17] plyr_1.8.8 timeDate_4022.108  munsell_0.5.0
> gtable_0.3.1
> > [21] ragg_1.2.5 htmlwidgets_1.6.1  codetools_0.2-19
>  labeling_0.4.2
> > [25] fastmap_1.1.0  tzdb_0.3.0 fansi_1.0.4Rcpp_1.0.10
> > [29] scales_1.2.1   jsonlite_1.8.4 farver_2.1.1
>  systemfonts_1.0.4
> > [33] textshaping_0.3.6  digest_0.6.31  hms_1.1.2
> stringi_1.7.12
> > [37] grid_4.2.3 cli_3.6.0  tools_4.2.3
> magrittr_2.0.3
> > [41] crayon_1.5.2   pkgconfig_2.0.3ellipsis_0.3.2
>  Matrix_1.5-3
> > [45] prettyunits_1.1.1  timechange_0.2.0   gower_1.0.1
> reshape_0.8.9
> > [49] rstudioapi_0.14iterators_1.0.14   R6_2.5.1
>  nlme_3.1-162
> > [53] compiler_4.2.3
> >
> >
> > Am Fr., 14. Apr. 2023 um 11:24 Uhr schrieb Duncan Murdoch <
> > murdoch.dun...@gmail.com>:
> >
> > > You should post the result of running sessionInfo(), and tell us how
> you
> > > installed R.  Your installation seems very broken.
> > >
> > > Duncan Murdoch
> > >
> > > On 14/04/2023 3:45 a.m., Gábor Malomsoki wrote:
> > > > This is the error then:
> > > > error in prettyseq(1:ncol(out)) : could not find function "prettyseq"
> > > >
> > > >
> > > >
> > > >
> > > > Eric Berger  schrieb am Fr., 14. Apr. 2023,
> > > 09:06:
> > > >
> > > >> What happens if you do the following?
> > > >>> library(caret)
> > > >>> ?caret::createDataPartition
> > > >>
> > > >> i.e. to confirm that caret is loaded, seek help on this function
> > > >>
> > > >>
> > > >> On Fri, Apr 14, 2023 at 9:56 AM Gábor Malomsoki <
> > > gmalomsoki1...@gmail.com>
> > > >> wrote:
> > > >>
> > > >>> Eric,
> > > >>>
> > > >>> Yes, i know, i am calling the package, but this is not working.
> > > >>> I saw a similar question in Stackoverflow, advising install package
> > > Rcpp,
> > > >>> but this one i am unable to install.
> > > >>>
> > > >>> Eric Berger  schrieb am Fr., 14. Apr. 2023,
> > > 08:47:
> > >

Re: [R] Package Caret

2023-04-16 Thread Gábor Malomsoki
I have newly installed R, R-tools, RStudio, but still not working:

library(caret)Lade nötiges Paket: latticeError: Laden von Paket oder
Namensraum für ‘caret’ in loadNamespace(i, c(lib.loc, .libPaths()),
versionCheck = vI[[i]]): fehlgeschlagen
 Namensraum ‘vctrs’ 0.5.2 ist bereits geladen, aber >= 0.6.0 wird gefordert


Error in createDataPartition(hypotezis_df$X, p = 0.75, list = FALSE,
times = 1) :
  could not find function "createDataPartition"


R version 4.2.3 (2023-03-15 ucrt)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19044)

Matrix products: default

locale:
[1] LC_COLLATE=German_Austria.utf8  LC_CTYPE=German_Austria.utf8
[3] LC_MONETARY=German_Austria.utf8 LC_NUMERIC=C
[5] LC_TIME=German_Austria.utf8

attached base packages:
[1] stats graphics  grDevices utils datasets  methods   base

other attached packages:
 [1] plotrix_3.8-2rgl_1.1.3scatterplot3d_0.3-43
lattice_0.20-45
 [5] knitr_1.42   GGally_2.1.2 fs_1.6.0
lubridate_1.9.2
 [9] forcats_1.0.0stringr_1.5.0dplyr_1.1.0
purrr_1.0.1
[13] readr_2.1.4  tidyr_1.3.0  tibble_3.1.8
ggplot2_3.4.2
[17] tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] progress_1.2.2 tidyselect_1.2.0   xfun_0.36  colorspace_2.1-0
 [5] vctrs_0.5.2generics_0.1.3 htmltools_0.5.4base64enc_0.1-3
 [9] utf8_1.2.2 rlang_1.1.0pillar_1.8.1   glue_1.6.2
[13] withr_2.5.0RColorBrewer_1.1-3 foreach_1.5.2  lifecycle_1.0.3
[17] plyr_1.8.8 timeDate_4022.108  munsell_0.5.0  gtable_0.3.1
[21] ragg_1.2.5 htmlwidgets_1.6.1  codetools_0.2-19   labeling_0.4.2
[25] fastmap_1.1.0  tzdb_0.3.0 fansi_1.0.4Rcpp_1.0.10
[29] scales_1.2.1   jsonlite_1.8.4 farver_2.1.1   systemfonts_1.0.4
[33] textshaping_0.3.6  digest_0.6.31  hms_1.1.2  stringi_1.7.12
[37] grid_4.2.3 cli_3.6.0  tools_4.2.3magrittr_2.0.3
[41] crayon_1.5.2   pkgconfig_2.0.3ellipsis_0.3.2 Matrix_1.5-3
[45] prettyunits_1.1.1  timechange_0.2.0   gower_1.0.1reshape_0.8.9
[49] rstudioapi_0.14iterators_1.0.14   R6_2.5.1   nlme_3.1-162
[53] compiler_4.2.3


Am Fr., 14. Apr. 2023 um 11:24 Uhr schrieb Duncan Murdoch <
murdoch.dun...@gmail.com>:

> You should post the result of running sessionInfo(), and tell us how you
> installed R.  Your installation seems very broken.
>
> Duncan Murdoch
>
> On 14/04/2023 3:45 a.m., Gábor Malomsoki wrote:
> > This is the error then:
> > error in prettyseq(1:ncol(out)) : could not find function "prettyseq"
> >
> >
> >
> >
> > Eric Berger  schrieb am Fr., 14. Apr. 2023,
> 09:06:
> >
> >> What happens if you do the following?
> >>> library(caret)
> >>> ?caret::createDataPartition
> >>
> >> i.e. to confirm that caret is loaded, seek help on this function
> >>
> >>
> >> On Fri, Apr 14, 2023 at 9:56 AM Gábor Malomsoki <
> gmalomsoki1...@gmail.com>
> >> wrote:
> >>
> >>> Eric,
> >>>
> >>> Yes, i know, i am calling the package, but this is not working.
> >>> I saw a similar question in Stackoverflow, advising install package
> Rcpp,
> >>> but this one i am unable to install.
> >>>
> >>> Eric Berger  schrieb am Fr., 14. Apr. 2023,
> 08:47:
> >>>
> >>>> You first have to load the package using the library command.
> >>>>> library(caret)
> >>>>
> >>>> Then you can call createDataPartition. e.g.
> >>>>> data(oil)
> >>>>> createDataPartition(oilType,2)
> >>>>
> >>>> HTH,
> >>>> Eric
> >>>>
> >>>>
> >>>> On Fri, Apr 14, 2023 at 7:52 AM Gábor Malomsoki <
> >>>> gmalomsoki1...@gmail.com> wrote:
> >>>>
> >>>>> Dear all,
> >>>>> When i try to use createDataPartition after calling package 'caret',
> i
> >>>>> get
> >>>>> the message:
> >>>>> "could not find function createDataPartition"
> >>>>>
> >>>>> I use:
> >>>>> R-4.2.3 for Windows
> >>>>> RStudio-2023.03.0-386
> >>>>>
> >>>>> Do you have any experience with this failure?
> >>>>>
> >>>>> Thank you!
> >>>>> Best regards
> >>>>> Gabor
> >>>>>
> >>>>>  [[alternative HTML version deleted]]
> >>>>>
> >

Re: [R] Package Caret

2023-04-14 Thread Gábor Malomsoki
Or is there any similar function to split the dataframe to trainDF and
testDF?

Gábor Malomsoki  schrieb am Fr., 14. Apr. 2023,
09:45:

>
> This is the error then:
> error in prettyseq(1:ncol(out)) : could not find function "prettyseq"
>
>
>
>
> Eric Berger  schrieb am Fr., 14. Apr. 2023, 09:06:
>
>> What happens if you do the following?
>> > library(caret)
>> > ?caret::createDataPartition
>>
>> i.e. to confirm that caret is loaded, seek help on this function
>>
>>
>> On Fri, Apr 14, 2023 at 9:56 AM Gábor Malomsoki 
>> wrote:
>>
>>> Eric,
>>>
>>> Yes, i know, i am calling the package, but this is not working.
>>> I saw a similar question in Stackoverflow, advising install package
>>> Rcpp, but this one i am unable to install.
>>>
>>> Eric Berger  schrieb am Fr., 14. Apr. 2023,
>>> 08:47:
>>>
>>>> You first have to load the package using the library command.
>>>> > library(caret)
>>>>
>>>> Then you can call createDataPartition. e.g.
>>>> > data(oil)
>>>> > createDataPartition(oilType,2)
>>>>
>>>> HTH,
>>>> Eric
>>>>
>>>>
>>>> On Fri, Apr 14, 2023 at 7:52 AM Gábor Malomsoki <
>>>> gmalomsoki1...@gmail.com> wrote:
>>>>
>>>>> Dear all,
>>>>> When i try to use createDataPartition after calling package 'caret', i
>>>>> get
>>>>> the message:
>>>>> "could not find function createDataPartition"
>>>>>
>>>>> I use:
>>>>> R-4.2.3 for Windows
>>>>> RStudio-2023.03.0-386
>>>>>
>>>>> Do you have any experience with this failure?
>>>>>
>>>>> Thank you!
>>>>> Best regards
>>>>> Gabor
>>>>>
>>>>> [[alternative HTML version deleted]]
>>>>>
>>>>> __
>>>>> R-help@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@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.


Re: [R] Package Caret

2023-04-14 Thread Gábor Malomsoki
This is the error then:
error in prettyseq(1:ncol(out)) : could not find function "prettyseq"




Eric Berger  schrieb am Fr., 14. Apr. 2023, 09:06:

> What happens if you do the following?
> > library(caret)
> > ?caret::createDataPartition
>
> i.e. to confirm that caret is loaded, seek help on this function
>
>
> On Fri, Apr 14, 2023 at 9:56 AM Gábor Malomsoki 
> wrote:
>
>> Eric,
>>
>> Yes, i know, i am calling the package, but this is not working.
>> I saw a similar question in Stackoverflow, advising install package Rcpp,
>> but this one i am unable to install.
>>
>> Eric Berger  schrieb am Fr., 14. Apr. 2023, 08:47:
>>
>>> You first have to load the package using the library command.
>>> > library(caret)
>>>
>>> Then you can call createDataPartition. e.g.
>>> > data(oil)
>>> > createDataPartition(oilType,2)
>>>
>>> HTH,
>>> Eric
>>>
>>>
>>> On Fri, Apr 14, 2023 at 7:52 AM Gábor Malomsoki <
>>> gmalomsoki1...@gmail.com> wrote:
>>>
>>>> Dear all,
>>>> When i try to use createDataPartition after calling package 'caret', i
>>>> get
>>>> the message:
>>>> "could not find function createDataPartition"
>>>>
>>>> I use:
>>>> R-4.2.3 for Windows
>>>> RStudio-2023.03.0-386
>>>>
>>>> Do you have any experience with this failure?
>>>>
>>>> Thank you!
>>>> Best regards
>>>> Gabor
>>>>
>>>> [[alternative HTML version deleted]]
>>>>
>>>> __
>>>> R-help@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@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.


Re: [R] Package Caret

2023-04-14 Thread Gábor Malomsoki
Eric,

Yes, i know, i am calling the package, but this is not working.
I saw a similar question in Stackoverflow, advising install package Rcpp,
but this one i am unable to install.

Eric Berger  schrieb am Fr., 14. Apr. 2023, 08:47:

> You first have to load the package using the library command.
> > library(caret)
>
> Then you can call createDataPartition. e.g.
> > data(oil)
> > createDataPartition(oilType,2)
>
> HTH,
> Eric
>
>
> On Fri, Apr 14, 2023 at 7:52 AM Gábor Malomsoki 
> wrote:
>
>> Dear all,
>> When i try to use createDataPartition after calling package 'caret', i get
>> the message:
>> "could not find function createDataPartition"
>>
>> I use:
>> R-4.2.3 for Windows
>> RStudio-2023.03.0-386
>>
>> Do you have any experience with this failure?
>>
>> Thank you!
>> Best regards
>> Gabor
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@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@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.


[R] Package Caret

2023-04-13 Thread Gábor Malomsoki
Dear all,
When i try to use createDataPartition after calling package 'caret', i get
the message:
"could not find function createDataPartition"

I use:
R-4.2.3 for Windows
RStudio-2023.03.0-386

Do you have any experience with this failure?

Thank you!
Best regards
Gabor

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] Stepmax in Neuralnet

2023-01-03 Thread Gábor Malomsoki
thanks,
i have not tried yet, because the memory of my computer is too small, and i
have to wait for the result ca 1 day.



Am Di., 3. Jan. 2023 um 11:21 Uhr schrieb Ivan Krylov :

> On Mon, 2 Jan 2023 17:50:09 +0100
> Gábor Malomsoki  wrote:
>
> > if i set the stepmax parameter higher then i increase the performance
> > of the neuralnet?
> > Would be my prediction more accurate?
>
> Unfortunately, it's very hard to give a good answer to this question as
> stated. If the model is underfitted, giving it more iterations might
> result in performance increase. If the model is not underfitted, giving
> it more iterations may improve its training set performance while
> worsening its ability to predict non-training samples.
>
> Have you tried it yourself?
>
> --
> Best regards,
> Ivan
>
> __
> R-help@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@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.


[R] Stepmax in Neuralnet

2023-01-02 Thread Gábor Malomsoki
Dear all,

if i set the stepmax parameter higher then i increase the performance of
the neuralnet?
Would be my prediction more accurate?

thanks
Best regards
Gabor

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] test logistic regression model

2022-11-20 Thread Gábor Malomsoki
Dear Bert,

Yes, was trying to fill the not existing categories with NAs, but the
suggested solutions in stackoverflow.com unfortunately did not work.

Best regards
Gabor


Bert Gunter  schrieb am So., 20. Nov. 2022, 16:20:

> You can't predict results for categories that you've not seen before
> (think about it). You will need to remove those cases from your test set
> (or convert them to NA and predict them as NA).
>
> -- Bert
>
> On Sun, Nov 20, 2022 at 7:02 AM Gábor Malomsoki 
> wrote:
>
>> Dear all,
>>
>> i have created a logistic regression model,
>>  on the train df:
>> mymodel1 <- glm(book_state ~ TG_KraftF5, data = train, family =
>> "binomial")
>>
>> then i try to predict with the test df
>> Predict<- predict(mymodel1, newdata = test, type = "response")
>> then iget this error message:
>> Error in model.frame.default(Terms, newdata, na.action = na.action, xlev =
>> object$xlevels)
>> Factor  "TG_KraftF5" has new levels
>>
>> i have tried different proposals from stackoverflow, but unfortunately
>> they
>> did not solved the problem.
>> Do you have any idea how to test a logistic regression model when you have
>> different levels in train and in test df?
>>
>> thank you in advance
>> Regards,
>> Gabor
>>
>> [[alternative HTML version deleted]]
>>
>> __
>> R-help@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@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.


[R] test logistic regression model

2022-11-20 Thread Gábor Malomsoki
Dear all,

i have created a logistic regression model,
 on the train df:
mymodel1 <- glm(book_state ~ TG_KraftF5, data = train, family = "binomial")

then i try to predict with the test df
Predict<- predict(mymodel1, newdata = test, type = "response")
then iget this error message:
Error in model.frame.default(Terms, newdata, na.action = na.action, xlev =
object$xlevels)
Factor  "TG_KraftF5" has new levels

i have tried different proposals from stackoverflow, but unfortunately they
did not solved the problem.
Do you have any idea how to test a logistic regression model when you have
different levels in train and in test df?

thank you in advance
Regards,
Gabor

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] intersection in data frame

2022-10-27 Thread Gábor Malomsoki
Dear all,

i have tried all of your proposals, all of them was ok.
Maybe dcast() with data table was faster.
Thank you!

Best regards
Gabor

Am Fr., 14. Okt. 2022 um 01:31 Uhr schrieb Dénes Tóth <
toth.de...@kogentum.hu>:

> Or if your data is really large, you can try data.table::dcast().
>
>  > library(data.table)
>  > dcast(ID ~ station, data = as.data.table(df1))
> ID xy xz
> 1: 12 15 20
> 2: 13 16 19
>
> (Note: instead of `as.data.table()`, you can use `setDT` or create your
> object as a data.table in the first place.)
>
>
> On 10/13/22 11:22 PM, Rui Barradas wrote:
> > Hello,
> >
> > To reshape from long to wide format, here are two options:
> >
> >
> > df1 <- 'IDstation  value
> > 12  xy15
> > 12  xz20
> > 13   xy   16
> > 13   xz   19'
> > df1 <- read.table(textConnection(df1), header = TRUE)
> >
> >
> > # base R
> > reshape(df1, direction = "wide", idvar = "ID", timevar = "station")
> > #>   ID value.xy value.xz
> > #> 1 12   15   20
> > #> 3 13   16   19
> >
> > # tidyverse
> > tidyr::pivot_wider(df1, ID, names_from = station)
> > #> # A tibble: 2 × 3
> > #>  IDxyxz
> > #> 
> > #> 1121520
> > #> 2131619
> >
> >
> > This question is StackOverflow question [1].
> >
> > [1]
> >
> https://stackoverflow.com/questions/5890584/how-to-reshape-data-from-long-to-wide-format
> >
> >
> >
> > Hope this helps,
> >
> > Rui Barradas
> >
> >
> > Às 19:08 de 13/10/2022, Gábor Malomsoki escreveu:
> >> Dears,
> >>
> >> i need to create from a column of observations variables in a datafram
> >> like
> >> this way:
> >> example:
> >> original:
> >> IDstation  value
> >> 12  xy15
> >> 12  xz20
> >> 13   xy   16
> >> 13   xz   19
> >>
> >> new df:
> >>
> >>   ID  xy xz
> >> 12  15 20
> >> 13  16 19
> >>
> >> i have been looking around for examples, but i could not find any how to
> >> change my df.
> >> I would like to make regression analysis on the values from different
> >> production stations, so my df is very huge.
> >>
> >> Please help on finding the package, description or anything else could
> >> help.
> >>
> >> Thank you in advance!
> >>
> >> Best regards
> >> Malo
> >>
> >> [[alternative HTML version deleted]]
> >>
> >> __
> >> R-help@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.
> >
> > __
> > R-help@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@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.


Re: [R] compile report error

2022-10-27 Thread Gábor Malomsoki
Dear Rui,

this is very strange, it seams that in your script there is no problem to
compile the report, but in mine not, i just sent you the rows 10:15 from
141299 obs.
It seams it does not like the punctuation marks in "Dichtheits.-
Durchflussprüfung M8.1", so i used a gsub () then a sub () replacing the
column with punctuation mark to something else.
Then i do not need this line in the script:
tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
"Dichtheits.- Durchflussprüfung M8.1"] <-"D_D_"
Now it works.

Thank you anyway

Best regards
Gabor








Am Mi., 26. Okt. 2022 um 22:08 Uhr schrieb Rui Barradas <
ruipbarra...@sapo.pt>:

> Às 20:19 de 26/10/2022, Gábor Malomsoki escreveu:
> > If i change the column name:
> > "Dichtheits.- Durchflussprüfung M8.1"
> > In the csv to something else, like "x" then it works, but this is not the
> > elegant solution.
> >
> >
> > Gábor Malomsoki  schrieb am Mi., 26. Okt.
> 2022,
> > 19:37:
> >
> >> Hello,
> >>
> >> sure
> >> dput(tomitettseg[10:15, c(1-8)])
> >>
> >> structure(list(serial_number = c("362017126683", "362017126683",
> >> "362017126683", "362017362605", "362017362605",
> >> "362017362605"
> >> ), station_number = c(362060010081, 362060010081, 362060010081,
> >> 362060010081, 362060010081, 362060010081), station_desc =
> c("Dichtheits.-
> >> Durchflussprüfung M8.1",
> >> "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
> >> M8.1",
> >> "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
> >> M8.1",
> >> "Dichtheits.- Durchflussprüfung M8.1"), part_number = c(40005935L,
> >> 40005935L, 40005935L, 40005935L, 40005935L, 40005935L), book_date =
> >> c("2019-01-15 07:49:58.46700",
> >> "2019-01-15 07:49:58.46700", "2019-01-15 07:49:58.46700",
> >> "2019-01-15 07:58:18.40300", "2019-01-15 07:58:18.40300",
> >> "2019-01-15 07:58:18.40300"), measure_name = c("BlowBy (BlowBy)
> >> Leckrate",
> >> "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate", "BlowBy (BlowBy)
> >> Leckrate",
> >> "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate"), book_state = c(0L,
> >> 0L, 0L, 0L, 0L, 0L)), row.names = 10:15, class = "data.frame")
> >>
> >>
> >>
> >> Am Mi., 26. Okt. 2022 um 19:05 Uhr schrieb Rui Barradas <
> >> ruipbarra...@sapo.pt>:
> >>
> >>> Às 17:51 de 26/10/2022, Gábor Malomsoki escreveu:
> >>>>Dear all,
> >>>>
> >>>> Error in parse(text = x, keep.source = TRUE) :
> >>>> :13:66: unexpected INCOMPLETE_STRING
> >>>> 12:
> >>>> 13: tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
> >>>> "Dichtheits.- Durchflusspr
> >>>>
> >>>> i get this error message when i try to compile the report.
> >>>> i think this is because of the punktuation mark between the quotation
> >>> marks
> >>>> "." .
> >>>> i do not know how to solve this, because with this column name i got
> the
> >>>> csv,  and i am changing the column name in the script, not to have it
> so
> >>>> long and avoid characters like .   ü  :
> >>>>tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
> >>>> "Dichtheits.- Durchflussprüfung M8.1"] <-"D_D_"
> >>>> thanks
> >>>>
> >>>> BR
> >>>> Gabor
> >>>>
> >>>>[[alternative HTML version deleted]]
> >>>>
> >>>> __
> >>>> R-help@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.
> >>>
> >>> Hello,
> >>>
> >>> Can you post the output of dput(x)? Or of dput(x[10:15])?
> >>>
> >>> Hope this helps,
> >>>
> &g

Re: [R] compile report error

2022-10-26 Thread Gábor Malomsoki
If i change the column name:
"Dichtheits.- Durchflussprüfung M8.1"
In the csv to something else, like "x" then it works, but this is not the
elegant solution.


Gábor Malomsoki  schrieb am Mi., 26. Okt. 2022,
19:37:

> Hello,
>
> sure
> dput(tomitettseg[10:15, c(1-8)])
>
> structure(list(serial_number = c("362017126683", "362017126683",
> "362017126683", "362017362605", "362017362605",
> "362017362605"
> ), station_number = c(362060010081, 362060010081, 362060010081,
> 362060010081, 362060010081, 362060010081), station_desc = c("Dichtheits.-
> Durchflussprüfung M8.1",
> "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
> M8.1",
> "Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
> M8.1",
> "Dichtheits.- Durchflussprüfung M8.1"), part_number = c(40005935L,
> 40005935L, 40005935L, 40005935L, 40005935L, 40005935L), book_date =
> c("2019-01-15 07:49:58.46700",
> "2019-01-15 07:49:58.46700", "2019-01-15 07:49:58.46700",
> "2019-01-15 07:58:18.40300", "2019-01-15 07:58:18.40300",
> "2019-01-15 07:58:18.40300"), measure_name = c("BlowBy (BlowBy)
> Leckrate",
> "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate", "BlowBy (BlowBy)
> Leckrate",
> "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate"), book_state = c(0L,
> 0L, 0L, 0L, 0L, 0L)), row.names = 10:15, class = "data.frame")
>
>
>
> Am Mi., 26. Okt. 2022 um 19:05 Uhr schrieb Rui Barradas <
> ruipbarra...@sapo.pt>:
>
>> Às 17:51 de 26/10/2022, Gábor Malomsoki escreveu:
>> >   Dear all,
>> >
>> > Error in parse(text = x, keep.source = TRUE) :
>> >:13:66: unexpected INCOMPLETE_STRING
>> > 12:
>> > 13: tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
>> > "Dichtheits.- Durchflusspr
>> >
>> > i get this error message when i try to compile the report.
>> > i think this is because of the punktuation mark between the quotation
>> marks
>> > "." .
>> > i do not know how to solve this, because with this column name i got the
>> > csv,  and i am changing the column name in the script, not to have it so
>> > long and avoid characters like .   ü  :
>> >   tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
>> > "Dichtheits.- Durchflussprüfung M8.1"] <-"D_D_"
>> > thanks
>> >
>> > BR
>> > Gabor
>> >
>> >   [[alternative HTML version deleted]]
>> >
>> > __
>> > R-help@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.
>>
>> Hello,
>>
>> Can you post the output of dput(x)? Or of dput(x[10:15])?
>>
>> Hope this helps,
>>
>> Rui Barradas
>>
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] compile report error

2022-10-26 Thread Gábor Malomsoki
Hello,

sure
dput(tomitettseg[10:15, c(1-8)])

structure(list(serial_number = c("362017126683", "362017126683",
"362017126683", "362017362605", "362017362605",
"362017362605"
), station_number = c(362060010081, 362060010081, 362060010081,
362060010081, 362060010081, 362060010081), station_desc = c("Dichtheits.-
Durchflussprüfung M8.1",
"Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
M8.1",
"Dichtheits.- Durchflussprüfung M8.1", "Dichtheits.- Durchflussprüfung
M8.1",
"Dichtheits.- Durchflussprüfung M8.1"), part_number = c(40005935L,
40005935L, 40005935L, 40005935L, 40005935L, 40005935L), book_date =
c("2019-01-15 07:49:58.46700",
"2019-01-15 07:49:58.46700", "2019-01-15 07:49:58.46700",
"2019-01-15 07:58:18.40300", "2019-01-15 07:58:18.40300",
"2019-01-15 07:58:18.40300"), measure_name = c("BlowBy (BlowBy)
Leckrate",
"BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate", "BlowBy (BlowBy)
Leckrate",
"BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate"), book_state = c(0L,
0L, 0L, 0L, 0L, 0L)), row.names = 10:15, class = "data.frame")



Am Mi., 26. Okt. 2022 um 19:05 Uhr schrieb Rui Barradas <
ruipbarra...@sapo.pt>:

> Às 17:51 de 26/10/2022, Gábor Malomsoki escreveu:
> >   Dear all,
> >
> > Error in parse(text = x, keep.source = TRUE) :
> >:13:66: unexpected INCOMPLETE_STRING
> > 12:
> > 13: tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
> > "Dichtheits.- Durchflusspr
> >
> > i get this error message when i try to compile the report.
> > i think this is because of the punktuation mark between the quotation
> marks
> > "." .
> > i do not know how to solve this, because with this column name i got the
> > csv,  and i am changing the column name in the script, not to have it so
> > long and avoid characters like .   ü  :
> >   tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
> > "Dichtheits.- Durchflussprüfung M8.1"] <-"D_D_"
> > thanks
> >
> > BR
> > Gabor
> >
> >   [[alternative HTML version deleted]]
> >
> > __
> > R-help@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.
>
> Hello,
>
> Can you post the output of dput(x)? Or of dput(x[10:15])?
>
> Hope this helps,
>
> Rui Barradas
>

[[alternative HTML version deleted]]

__
R-help@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.


[R] compile report error

2022-10-26 Thread Gábor Malomsoki
 Dear all,

Error in parse(text = x, keep.source = TRUE) :
  :13:66: unexpected INCOMPLETE_STRING
12:
13: tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
"Dichtheits.- Durchflusspr

i get this error message when i try to compile the report.
i think this is because of the punktuation mark between the quotation marks
"." .
i do not know how to solve this, because with this column name i got the
csv,  and i am changing the column name in the script, not to have it so
long and avoid characters like .   ü  :
 tomitettseg_GesNa$station_desc[tomitettseg_GesNa$station_desc ==
"Dichtheits.- Durchflussprüfung M8.1"] <-"D_D_"
thanks

BR
Gabor

[[alternative HTML version deleted]]

__
R-help@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.


[R] intersection in data frame

2022-10-13 Thread Gábor Malomsoki
Dears,

i need to create from a column of observations variables in a datafram like
this way:
example:
original:
IDstation  value
12  xy15
12  xz20
13   xy   16
13   xz   19

new df:

 ID  xy xz
12  15 20
13  16 19

i have been looking around for examples, but i could not find any how to
change my df.
I would like to make regression analysis on the values from different
production stations, so my df is very huge.

Please help on finding the package, description or anything else could help.

Thank you in advance!

Best regards
Malo

[[alternative HTML version deleted]]

__
R-help@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.