[R-es] Resultado de la consola como un tibble

2020-10-17 Thread Jimmy Erney Reyes Velasco
Buen día estimados Estoy tratando de hacer un tibble con los resultados de un apply que se muestran en la consola que me da R, no estoy seguro si eso se pueda hacer, pero me gustaría organizar los resultados de esa manera. mi código es: data("mtcars") Mtcars_matriz <- as.matrix(mtcars)

Re: [R] Need help in R code of the functional data .

2020-10-17 Thread Richard O'Keefe
I do not understand your question. Are you talking about "functional data analysis", the statistical analysis of data where some of the covariates are (samples from) continuous functions? There are books and tutorials about doing that in R. Are you talking about "functional data structures", as

Re: [R] ??? is to nls() as abline() is to lm() ?

2020-10-17 Thread Boris Steipe
I had tried predict() but overlooked that it is picky about needing the data in a list-like object. When I passed a vector it just returned the predictions on the original values. Passing a list (as in the help example... of course) does the trick. This works - and does exactly what I had

Re: [R] ??? is to nls() as abline() is to lm() ?

2020-10-17 Thread Duncan Murdoch
I haven't followed your example closely, but can't you use the predict() method for this? To draw a curve, the function that will be used in curve() sets up a newdata dataframe and passes it to predict(fit, newdata= ...) to get predictions at those locations. Duncan Murdoch On 17/10/2020

[R] ??? is to nls() as abline() is to lm() ?

2020-10-17 Thread Boris Steipe
I'm drawing a fitted normal distribution over a histogram. The use case is trivial (fitting normal distributions on densities) but I want to extend it to other fitting scenarios. What has stumped me so far is how to take the list that is returned by nls() and use it for curve(). I realize that