[R] R-package imputeTS / warning messages
Dear colleagues, For data imputation in time series, I am using the R-package imputeTS, using its funcion na_kalman. For some calls to that funcion, I get the following warning message: In stats::StructTS(data, ...) : possible convergence problem: 'optim' gave code = 52 and message ‘ERROR: ABNORMAL_TERMINATION_IN_LNSRCH’ The function StructTS is called by the function na_kalman of the imputeTS package. In one run of my program, in 600 calls to the na_kalman function (in bootstrap calculations), I've got 15 warning messages like that. Would someone please tell me about the implications of such a message? To my eyes, the imputation results I am getting look perfectly acceptable. Thank you very much. Paulo Barata (Rio de Janeiro - Brazil) __ 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] Color Nodes
Yes Rui that will work for my needs thank you -Original Message- From: Rui Barradas Sent: Wednesday, October 26, 2022 4:40 PM To: reichm...@sbcglobal.net; R-help@r-project.org Subject: Re: [R] Color Nodes Às 21:37 de 26/10/2022, Jeff Reichman escreveu: > R-Help > > > > For those of you who use igraph is there a way to highlight (color) > particular notes. For example if I want to color the "Peter" node red > and everything else blue or leave default) how would I do that or can > I do that. Seems as though I might create an attribute column - maybe?? > > > > Jeff > > > > library(igraph) > > > > # define links in data > > edges <- rbind(c("Dave", "Jenny"), c("Peter", "Jenny"), c("John", > "Jenny"), c("Dave", "Peter"), c("Dave", "John"), c("Peter", "Sam"), > c("Sam", "Albert"), c("Peter", "John")) > > > > # generate and plot graph > > # set argument directed = FALSE in graph.edgelist() to plot an > undirected graph. > > g <- graph.edgelist(edges, directed = FALSE) > > plot(g, vertex.size = 1, vertex.label.dist = 0.5) > > > [[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, After creating the graph, set the vertices colors by subsetting V(g). Here are two exaples, the first color Peter red and leave the others with their default color. The second, color the other vertices blue. V(g)["Peter"]$color <- "red" plot(g, vertex.size = 20, vertex.label.dist = 0.5, vertex.color = V(g)$color) V(g)$color <- "blue" V(g)["Peter"]$color <- "red" plot(g, vertex.size = 20, vertex.label.dist = 0.5, vertex.color = V(g)$color) Hope this helps, Rui Barradas __ 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] Color Nodes
Às 21:37 de 26/10/2022, Jeff Reichman escreveu: R-Help For those of you who use igraph is there a way to highlight (color) particular notes. For example if I want to color the "Peter" node red and everything else blue or leave default) how would I do that or can I do that. Seems as though I might create an attribute column - maybe?? Jeff library(igraph) # define links in data edges <- rbind(c("Dave", "Jenny"), c("Peter", "Jenny"), c("John", "Jenny"), c("Dave", "Peter"), c("Dave", "John"), c("Peter", "Sam"), c("Sam", "Albert"), c("Peter", "John")) # generate and plot graph # set argument directed = FALSE in graph.edgelist() to plot an undirected graph. g <- graph.edgelist(edges, directed = FALSE) plot(g, vertex.size = 1, vertex.label.dist = 0.5) [[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, After creating the graph, set the vertices colors by subsetting V(g). Here are two exaples, the first color Peter red and leave the others with their default color. The second, color the other vertices blue. V(g)["Peter"]$color <- "red" plot(g, vertex.size = 20, vertex.label.dist = 0.5, vertex.color = V(g)$color) V(g)$color <- "blue" V(g)["Peter"]$color <- "red" plot(g, vertex.size = 20, vertex.label.dist = 0.5, vertex.color = V(g)$color) Hope this helps, Rui Barradas __ 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] Color Nodes
R-Help For those of you who use igraph is there a way to highlight (color) particular notes. For example if I want to color the "Peter" node red and everything else blue or leave default) how would I do that or can I do that. Seems as though I might create an attribute column - maybe?? Jeff library(igraph) # define links in data edges <- rbind(c("Dave", "Jenny"), c("Peter", "Jenny"), c("John", "Jenny"), c("Dave", "Peter"), c("Dave", "John"), c("Peter", "Sam"), c("Sam", "Albert"), c("Peter", "John")) # generate and plot graph # set argument directed = FALSE in graph.edgelist() to plot an undirected graph. g <- graph.edgelist(edges, directed = FALSE) plot(g, vertex.size = 1, vertex.label.dist = 0.5) [[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
À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, Rui Barradas Hello, Are you looking for this? df1 <- 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") parse(text = df1, keep.source = TRUE) #> expression(c("362017126683", "362017126683", "362017126683", "362017362605", "362017362605", "362017362605"), #> c(362060010081, 362060010081, 362060010081, 362060010081, 362060010081, 362060010081), #> 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"), #> c(40005935, 40005935, 40005935, 40005935, 40005935, 40005935), #> 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"), #> c("BlowBy (BlowBy) Leckrate", "BlowBy (BlowBy) Druck", "GESnA (GESnA) Leckrate", "BlowBy (BlowBy) Leckrate", "BlowBy (BlowBy) Druck", "GESnA (GESnA)
Re: [R] Best place to ask questions about non-R Base topics, ex. dplyr, dbplyr, etc. ?
Also, since your examples were dplyr and dbplyr which are associated with RStudio.com (aka Posit) you might also try https://community.rstudio.com You can apply filters on that site to narrow the results On Wed, Oct 26, 2022 at 10:12 PM Jeff Newmiller wrote: > > The general recommendation is to consult the contributed package web page on > CRAN for a URL entry or other recommendation for support, e.g. [1]. Other > forums include StackExchange for theory and StackOverflow for computing, and > there are several sub-reddits on Reddit related to R. > > [1] https://cran.r-project.org/package=dplyr > > On October 26, 2022 11:09:58 AM PDT, Kelly Thompson > wrote: > > > >__ > >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. > > -- > Sent from my phone. Please excuse my brevity. > > __ > 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.
Re: [R] compile report error
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] Best place to ask questions about non-R Base topics, ex. dplyr, dbplyr, etc. ?
The general recommendation is to consult the contributed package web page on CRAN for a URL entry or other recommendation for support, e.g. [1]. Other forums include StackExchange for theory and StackOverflow for computing, and there are several sub-reddits on Reddit related to R. [1] https://cran.r-project.org/package=dplyr On October 26, 2022 11:09:58 AM PDT, Kelly Thompson wrote: > >__ >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. -- Sent from my phone. Please excuse my brevity. __ 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-es] minera de texto 2
José, Puedes usar discurso <- scan('ruta/al/archivo/de/texto.txt', what = 'character') Luego puedes tomar el objeto "discurso" y procesarlo adecuadamente. Saludos, Jorge.- On Wed, Oct 26, 2022 at 12:26 PM Jose Betancourt Bethencourt < betans...@gmail.com> wrote: > -Estimados > > Como lograr en mineria de texto en R que se lea un archivo de txt que > tiene un discurso escrito, no en columnas, sino texto integro > > saludos > > José > > ___ > R-help-es mailing list > R-help-es@r-project.org > https://stat.ethz.ch/mailman/listinfo/r-help-es > [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
[R] Best place to ask questions about non-R Base topics, ex. dplyr, dbplyr, etc. ?
__ 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-es] minera de texto 2
ESTIMADOS NO ME DA LA SOLUCIÓN A LO QUE PREGINTÉ QUE FUE: -Estimados Como lograr en mineria de texto en R que se lea un archivo de txt que tiene un discurso escrito, no en columnas, sino texto integro saludos José El 26/10/22, Carlos Ortega escribió: > Hola, > > Sigue este ejemplo... > > https://cran.r-project.org/web/packages/udpipe/vignettes/udpipe-usecase-postagging-lemmatisation.html > > Gracias, > Carlos Ortega > www.qualityexcellence.es > > El mié, 26 oct 2022 a las 19:26, Jose Betancourt Bethencourt (< > betans...@gmail.com>) escribió: > >> -Estimados >> >> Como lograr en mineria de texto en R que se lea un archivo de txt que >> tiene un discurso escrito, no en columnas, sino texto integro >> >> saludos >> >> José >> >> ___ >> R-help-es mailing list >> R-help-es@r-project.org >> https://stat.ethz.ch/mailman/listinfo/r-help-es >> > > > -- > Saludos, > Carlos Ortega > www.qualityexcellence.es > -- Dr. Jose A. Betancourt Bethencourt Universidad de Ciencias Medicas Carlos j. Finlay ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R] compile report error
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-es] minera de texto 2
-Estimados Como lograr en mineria de texto en R que se lea un archivo de txt que tiene un discurso escrito, no en columnas, sino texto integro saludos José ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R] Function for Distribution Fitting
If you have three values, then it should be possible to fit any number of distributions such that they could return those three values. On the other hand, if you have billions of values and insist on a perfect fit then you may have a unique distribution only identified by the data in hand. For most purposes it is better to define the distribution based on your understanding of the numbers and how they were generated rather than trying to identify the distribution that best matches your data. I do not know your application for this. Here is a list of available functions in R: https://cran.r-project.org/web/views/Distributions.html I hope that helps, but I am not sure this is a task worth doing. If you start at the top of the list, and stop at the first "match" that sounds a bit like p-hacking. Tim -Original Message- From: R-help On Behalf Of JRG via R-help Sent: Wednesday, October 26, 2022 10:01 AM To: r-help@r-project.org Subject: Re: [R] Function for Distribution Fitting [External Email] "all possible probability distributions" I doubt that is a finite set. To select "a bunch of them" would seem to imply a reduction of that set based on what's possible/promising/pertinent in your specific problem. IMHO, what's the "most suitable distribution" tends to depend partly on knowledge of the subject matter of your problem. Doesn't that put you back in your present situation? ---JRG On 10/26/22 09:41, Paul Bernal wrote: > Dear friends from the R community, > > Hope you are all doing great. So far, whenever I need to perform > distribution fitting on a particular dataset, I make use of R package > fitdistrplus. > > However, distribution fitting using the fitdist() function from > fitdistrplus is rather manual (you need to specify which probability > distribution you are trying to fit), and it would be more convenient > if the function tested all possible probability distributions (or a > bunch of them) and then estimates the parameters and suggests the most > suitable distribution. > > Is there any package besides fitdistrplus that does allow automatic > distribution fitting? > > Best regards, > Paul > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat > .ethz.ch%2Fmailman%2Flistinfo%2Fr-helpdata=05%7C01%7Ctebert%40ufl > .edu%7Cf7aa511782ff4d98a04908dab75aa2a0%7C0d4da0f84a314d76ace60a62331e > 1b84%7C0%7C0%7C638023897166448945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4w > LjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C > sdata=XS069Wk8JxeT4piBqA5JC3vtE2vu6uS8KTp1tqDIf7c%3Dreserved > =0 PLEASE do read the posting guide > https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r > -project.org%2Fposting-guide.htmldata=05%7C01%7Ctebert%40ufl.edu% > 7Cf7aa511782ff4d98a04908dab75aa2a0%7C0d4da0f84a314d76ace60a62331e1b84% > 7C0%7C0%7C638023897166448945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwM > DAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C > sdata=FZHNApQa2raJnbAgUZ544bH91EMtjSG7Ef47dMCoo3M%3Dreserved=0 > and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fstat.ethz.ch%2Fmailman%2Flistinfo%2Fr-helpdata=05%7C01%7Ctebert%40ufl.edu%7Cf7aa511782ff4d98a04908dab75aa2a0%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638023897166448945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=XS069Wk8JxeT4piBqA5JC3vtE2vu6uS8KTp1tqDIf7c%3Dreserved=0 PLEASE do read the posting guide https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.r-project.org%2Fposting-guide.htmldata=05%7C01%7Ctebert%40ufl.edu%7Cf7aa511782ff4d98a04908dab75aa2a0%7C0d4da0f84a314d76ace60a62331e1b84%7C0%7C0%7C638023897166448945%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7Csdata=FZHNApQa2raJnbAgUZ544bH91EMtjSG7Ef47dMCoo3M%3Dreserved=0 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.
Re: [R] compile report error
À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 __ 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
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.
Re: [R] Function for Distribution Fitting
A Cullen & Frey graph (fitdistrplus::descdist) can be used to compare certain common distributions. On Wed, Oct 26, 2022 at 9:42 AM Paul Bernal wrote: > > Dear friends from the R community, > > Hope you are all doing great. So far, whenever I need to perform > distribution fitting on a particular dataset, I make use of R package > fitdistrplus. > > However, distribution fitting using the fitdist() function from > fitdistrplus is rather manual (you need to specify which probability > distribution you are trying to fit), and it would be more convenient if the > function tested all possible probability distributions (or a bunch of them) > and then estimates the parameters and suggests the most suitable > distribution. > > Is there any package besides fitdistrplus that does allow automatic > distribution fitting? > > Best regards, > Paul > > [[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. -- Statistics & Software Consulting GKX Group, GKX Associates Inc. tel: 1-877-GKX-GROUP email: ggrothendieck at gmail.com __ 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] Function for Distribution Fitting
Of course it's an infinite set! The OP should look here: https://cran.r-project.org/web/views/Distributions.html -- Bert On Wed, Oct 26, 2022 at 7:01 AM JRG via R-help wrote: > > "all possible probability distributions" > > I doubt that is a finite set. To select "a bunch of them" would seem to > imply a reduction of that set based on what's > possible/promising/pertinent in your specific problem. IMHO, what's the > "most suitable distribution" tends to depend partly on knowledge of the > subject matter of your problem. > > Doesn't that put you back in your present situation? > > > > ---JRG > > > > > On 10/26/22 09:41, Paul Bernal wrote: > > Dear friends from the R community, > > > > Hope you are all doing great. So far, whenever I need to perform > > distribution fitting on a particular dataset, I make use of R package > > fitdistrplus. > > > > However, distribution fitting using the fitdist() function from > > fitdistrplus is rather manual (you need to specify which probability > > distribution you are trying to fit), and it would be more convenient if the > > function tested all possible probability distributions (or a bunch of them) > > and then estimates the parameters and suggests the most suitable > > distribution. > > > > Is there any package besides fitdistrplus that does allow automatic > > distribution fitting? > > > > Best regards, > > Paul > > > > [[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. __ 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] Function for Distribution Fitting
"all possible probability distributions" I doubt that is a finite set. To select "a bunch of them" would seem to imply a reduction of that set based on what's possible/promising/pertinent in your specific problem. IMHO, what's the "most suitable distribution" tends to depend partly on knowledge of the subject matter of your problem. Doesn't that put you back in your present situation? ---JRG On 10/26/22 09:41, Paul Bernal wrote: > Dear friends from the R community, > > Hope you are all doing great. So far, whenever I need to perform > distribution fitting on a particular dataset, I make use of R package > fitdistrplus. > > However, distribution fitting using the fitdist() function from > fitdistrplus is rather manual (you need to specify which probability > distribution you are trying to fit), and it would be more convenient if the > function tested all possible probability distributions (or a bunch of them) > and then estimates the parameters and suggests the most suitable > distribution. > > Is there any package besides fitdistrplus that does allow automatic > distribution fitting? > > Best regards, > Paul > > [[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.
[R] Function for Distribution Fitting
Dear friends from the R community, Hope you are all doing great. So far, whenever I need to perform distribution fitting on a particular dataset, I make use of R package fitdistrplus. However, distribution fitting using the fitdist() function from fitdistrplus is rather manual (you need to specify which probability distribution you are trying to fit), and it would be more convenient if the function tested all possible probability distributions (or a bunch of them) and then estimates the parameters and suggests the most suitable distribution. Is there any package besides fitdistrplus that does allow automatic distribution fitting? Best regards, Paul [[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] unexpected 'else' in " else"
This is explained in books about S and R. The first place to look is of course > ?"if" which says Note that it is a common mistake to forget to put braces ('{ .. }') around your statements, e.g., after 'if(..)' or 'for()'. In particular, you should not have a newline between '}' and 'else' to avoid a syntax error in entering a 'if ... else' construct at the keyboard or via 'source'. For that reason, one (somewhat extreme) attitude of defensive programming is to always use braces, e.g., for 'if' clauses. The basic issue is that the top level wants to get started on your command AS SOON AS IT HAS A COMPLETE COMMAND, and if (...) stmt is complete. It's not going to hang around "Waiting for Godot" for an 'else' that might never ever ever turn up. So if (x < y) z <- x else z <- y is absolutely fine, no braces needed, while if (x < y) z <- x else z <- y will see the eager top level rush off to do your bidding at the end of the first line and then be completely baffled by an 'else' where it does not expect one. It's the same reason that you break AFTER infix operators instead of BEFORE. x <- y + z works fine, while x <- y + z doesn't. On Fri, 21 Oct 2022 at 22:29, Jinsong Zhao wrote: > Hi there, > > The following code would cause R error: > > > w <- 1:5 > > r <- 1:5 > > if (is.matrix(r)) > + r[w != 0, , drop = FALSE] > > else r[w != 0] > Error: unexpected 'else' in "else" > > However, the code: > if (is.matrix(r)) > r[w != 0, , drop = FALSE] > else r[w != 0] > is extracted from stats::weighted.residuals. > > My question is why the code in the function does not cause error? > > Best, > Jinsong > > __ > 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] cannot print a list with cat
\n is for TERMINATING lines. Just like in C, C++, Java, C#, Python, Ruby, Erlang, pretty much everything that uses \n in strings at all. sprintf("gradtol = %e\n", mycontrol$gradtol) makes sense. More generally, sprintf() takes as many arguments as you care to give it, so cat(sprintf("tol = %e\nreltol = %e\nsteptol = %e\ngradtol = %e\n", mycontrol$tol, mycontrol$reltol, mycontrol$steptol, mycontrol$gradtol)) R being R, I'd prefer using ?format myself. On Tue, 25 Oct 2022 at 04:29, Steven T. Yen wrote: > Thanks to everyone. I read ? sprint and the following is best I came up > with. If there are ways to collapse the lines I'd be glad to know. > Otherwise, I will live with this. Thanks again. > > cat(sprintf("\ntol = %e",mycontrol$tol), > sprintf("\nreltol = %e",mycontrol$reltol), > sprintf("\nsteptol = %e",mycontrol$steptol), > sprintf("\ngradtol = %e",mycontrol$gradtol)) > > tol = 0.00e+00 > reltol = 0.00e+00 > steptol = 1.00e-08 > gradtol = 1.00e-10 > > On 10/24/2022 10:02 PM, Rui Barradas wrote: > > Hello, > > > > There's also ?message. > > > > > > msg <- sprintf("(tol,reltol,steptol,gradtol): %E %E %E %E", > > > > mycontrol$tol,mycontrol$reltol,mycontrol$steptol,mycontrol$gradtol) > > message(msg) > > > > > > Hope this helps, > > > > Rui Barradas > > > > Às 14:25 de 24/10/2022, Steven T. Yen escreveu: > >> Thank, Boris and Ivan. > >> > >> The simple command suggested by Ivan ( print(t(mycontrol)) ) worked. > >> I went along with Boris' suggestion and do/get the following: > >> > >> cat(sprintf("(tol,reltol,steptol,gradtol): %E %E %E %E",mycontrol$tol, > >> mycontrol$reltol,mycontrol$steptol,mycontrol$gradtol)) > >> > >> (tol,reltol,steptol,gradtol): 0.00E+00 0.00E+00 1.00E-08 > >> 1.00E-12 > >> > >> This works great. Thanks. > >> > >> Steven > >> > >> On 10/24/2022 9:05 PM, Boris Steipe wrote: > >> > >>> ??? t() is the transpose function. It just happens to return your > >>> list unchanged. The return value is then printed to console if it is > >>> not assigned, or returned invisibly. Transposing your list is > >>> probably not what you wanted to do. > >>> > >>> Returned values do not get printed from within a loop or from a > >>> source()'d script. That's why it "works" interactively, but not from > >>> a script file. > >>> > >>> If you want to print the contents of your list, just use: > >>>print(mycontrol) > >>> > >>> Or use some incantation with sprintf() if you want more control > >>> about the format of what gets printed. Eg: > >>> > >>> cat(sprintf("Tolerance: %f (%f %%)", mycontrol$tol, > >>> mycontrol$reltol)) > >>> > >>> etc. > >>> > >>> > >>> B. > >>> > >>> > >>> > On 2022-10-24, at 08:47, Ivan Krylov wrote: > > В Mon, 24 Oct 2022 20:39:33 +0800 > "Steven T. Yen" пишет: > > > Printing this in a main program causes no problem (as shown above). > > But, using the command t(mycontrol) the line gets ignored. > t() doesn't print, it returns a value. In R, there's auto-printing in > the toplevel context (see ?withAutoprint), but not when you move away > from the interactive prompt. I think that it should be possible to use > an explicit print(t(mycontrol)) to get the behaviour you desire. > > -- > 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. > >> > >> __ > >> 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.