Re: [R] preserve class in apply function

2023-02-08 Thread avi.e.gross
Naresh, This is a common case where the answer to a question is to ask the right question. Your question was how to make apply work. My question is how can you get the functionality you want done in some version of R. Apply is a tool and it is only one of many tools and may be the wrong

Re: [R] preserve class in apply function

2023-02-08 Thread avi.e.gross
Jorgen is correct that for many purposes, viewing a data.frame as a collection of vectors of the same length allows you to code fairly complex logic using whichever vectors you want and result in a vector answer, either externally or as a new column. Text columns used to make some decisions in the

Re: [R] preserve class in apply function

2023-02-08 Thread Gabor Grothendieck
Also try apply(Filter(is.numeric, mydf), 1, sum) On Tue, Feb 7, 2023 at 8:42 AM PIKAL Petr wrote: > > Hi Naresh > > If you wanted to automate the function a bit you can use sapply to find > numeric columns > ind <- sapply(mydf, is.numeric) > > and use it in apply construct > apply(mydf[,ind],

[R] How to split a overflow slide content to slides automatically using revealjs in rmarkdown?

2023-02-08 Thread vod vos via R-help
How to split a overflow slide content to slides automatically using revealjs or other html representation creator in rmarkdown, the effects like beamer "allow frame breaker" option with subsection number added? And the main section number (slide title) will not be increased? Thanks.

[R] How to split a overflow slide content to slides automatically using revealjs in rmarkdown?

2023-02-08 Thread vod vos via R-help
Hi, How to split a overflow slide content to slides automatically using revealjs or other html representation creator in rmarkdown, the effects like beamer "allow frame breaker" option with subsection number added? And the main section number (slide title) will not be increased? Thanks.

Re: [R] identify the distribution of the data

2023-02-08 Thread PIKAL Petr
Hi Others gave you more fundamental answers. To check the possible distribution you could use package https://cran.r-project.org/web/packages/fitdistrplus/index.html Cheers Petr > -Original Message- > From: R-help On Behalf Of Bogdan Tanasa > Sent: Wednesday, February 8, 2023 5:35 PM

Re: [R] identify the distribution of the data

2023-02-08 Thread Ebert,Timothy Aaron
IMO) The best approach is to develop a good understanding of the individual processes that resulted in the observed values. The blend of those processes then results in the distribution of the observed values. This is seldom done, and often not possible to do. The alternatives depend on why you

Re: [R] preserve class in apply function

2023-02-08 Thread Jorgen Harmse via R-help
What are you trying to do? Why use apply when there is already a vector addition operation? df$x+df$y or as.numeric(df$x)+as.numeric(df$y) or rowSums(as.numeric(df[c('x','y')])). As noted in other answers, apply will coerce your data frame to a matrix, and all entries of a matrix must have the

[R] identify the distribution of the data

2023-02-08 Thread Bogdan Tanasa
Dear all, I do have dataframes with numerical values such as 1,9, 20, 51, 100 etc Which way do you recommend to use in order to identify the type of the distribution of the data (normal, poisson, bernoulli, exponential, log-normal etc ..) Thanks so much, Bogdan [[alternative HTML

Re: [R] identify the distribution of the data

2023-02-08 Thread Bert Gunter
1. This is a statistical question, which usually is inappropriate here: this list is about R language (including packages) programming. 2. IMO (so others may disagree), your question indicates a profound misunderstanding of basic statistical issues. While maybe you phrased it poorly or I

Re: [R] identify the distribution of the data

2023-02-08 Thread Spencer Graves
On 2/8/23 12:06 PM, Ebert,Timothy Aaron wrote: IMO) The best approach is to develop a good understanding of the individual processes that resulted in the observed values. The blend of those processes then results in the distribution of the observed values. This is seldom done, and often

[R-es] Actualizar tabla en shiny

2023-02-08 Thread Guillermo.Vinue
Hola, Quería preguntar si alguien sabe cómo se puede utilizar el resultado de modificar una tabla con el argumento editable = TRUE de datatable, para actualizar una segunda tabla. Adjunto un código de ejemplo y lo copio también aquí abajo. Lo que yo querría por ejemplo es poner en la columna