Re: [R] correlation by factor

2021-07-27 Thread Rui Barradas
Hello, And here are three more ways. I will put the data, corrected in Bert's post, in a data.frame. R <- c(1,8,3,6,7,2,3,7,2,3,3,4,3,7,3) Day <- c(1,1,1,1,1,2,2,2,2,2,3,3,3,3,3) Freq <- paste0("a", rep(1:5,3)) df1 <- data.frame(R, Day, Freq) # Base R, as for the function, see Bert's post sa

Re: [R] correlation by factor

2021-07-27 Thread Bert Gunter
Well, first of all, your example is messed up. You missed the "c" in front of the ( in Freq <-; and all of the Freq entries need to be enclosed in quotes for proper syntax. A simpler way to do it is just to use paste() and rep(): Freq <- paste0("a", rep(1:5,3)) (If you are not familiar with such "

[R] correlation by factor

2021-07-27 Thread Marlin Keith Cox
I am having problems making a correlation/association between two variables by a factor. In the case below, I need to know the correlation between R and Day at each frequency (a1-a5). Each frequency would have a corresponding correlation between R and day. I have found a lm function that is simil

[R] Comparing methods for estimating misspecified models

2021-07-27 Thread nura sambo
I want to compare between conditional maximum likelihood (CML) and weight maximum likelihood (WML) using misspecified ordinary least square model. Are there packages in R which implements the conditonal maximum likelihood and weighted maximum likelihood method for estimating OLS Models? [[

Re: [R] RMariaDB returns a query without microseconds

2021-07-27 Thread Ralf Goertz
Am Mon, 26 Jul 2021 16:07:24 + (UTC) schrieb Baki UNAL via R-help : > Hi > > I can query a table from a mysql database with RMariaDB. One of the > table's column indicates "trade_time" and contains values such as > "09:55:02.113000". When I query this table I can not get fractional > seconds.

Re: [R] Puzzled over "partial"

2021-07-27 Thread Richard O'Keefe
In this context, "partial" is not the name of any function or package in R. It is just the name of a parameter. And its meaning, which is specific to sort(), is spelled out in the documentation for sort: > ?sort ... If ‘partial’ is not ‘NULL’, it is taken to contain indices of elements