R is a free, open-source programming language and software environment for statistical computing, bioinformatics, visualization, and general computing. Please provide minimal and reproducible example(s) along with the desired output. Use `dput()` for data and specify all non-base packages with `library()` calls. Do not embed pictures for data or code, use indented code blocks instead. For statistics related questions, use http://stats.stackexchange.com.

Prior to the
ggplot(df, aes(x = mass, y = method))+geom_box(coef=Inf)
I use
filter()%>%drop_na(mass)%>%mutate()
where mass is mapped to the x aes. Then I'm getting this error
"Computation ...

I have a function "f" as follows:
f <- function (X){
DD= 91.8372-10.3096*(as.numeric((X[1]<70.5)&(X[2]>69.5)&(X[2]<79.5)&(X[3]>37.5)))
+5.3719*(as....

I am trying to count the # of unique date values across multiple visits. Here is sample data:
id date
1 2017-08-31
1 2017-08-31
1 2017-05-06
2 2015-09-01
2 2015-11-01
3 ...

I have a matrix generating function that produces lower-triangle of 1s and upper-triangle of 0s.
I was wondering if it might be possible to add some adjustable random noise (from some distribution ...

asked 29 mins ago

rnorouzian
5,43622 gold badges1212 silver badges3636 bronze badges

I have a matrix like list1.I want to get the maximum at the two positions that are symmetric diagonally, and get the new matrix(list2).How can I run R or Excel?
list1
A B C D
A 11 9 11 ...

I have multiple dataframes for each type of ice cream. Each data frame says whether or not someone purchased that type of ice cream (column 1) YES or NO, and how many people chose Yes or No (column 2)....

Because of overdispersion, I try to use beta-binomial method fit the data. However, it seems emmeans and glht did not support the model by betabin. I test by the example data orob2 in aod, and want to ...

I was wondering if there is a way to generate matrices with any requested number of rows and columns such that the bottom triangle is only 1s and top triangle is only 0s.
An example of the expected ...

asked 1 hour ago

rnorouzian
5,43622 gold badges1212 silver badges3636 bronze badges

This may be a very daft question but I have been trying to achieve it and have not yet succeeded. I have a dataframe that looks like this:
df <- data.frame(Participant = c("PAH12", "...

Instead of typing c("Col1","Col2","Col3", "Col4", "Col5", "Col6", "Col7", "Col8", "Col9", "Col10"), ...

This demo R script has two data frames, that are displayed by two Reactable tables.
When the number of checkboxes in the Iris table exceeds 2, the warning message in the msg table should change.
Here ...

asked 2 hours ago

ixodid
92777 silver badges2121 bronze badges

In my practice, many shiny apps needs to access Postgresql DB which installed on host.
I use pool package to get connection pool of Postgresql, and set it to global variable shared for other apps.
But ...

I have a data frame of sports games and want to get the average of the previous n points. For example, my data frame looks like this:
Home Away Home Away
Team Team Points Points
1 ...

Trying to use R to build a deep learning GAN, unlike other similar issues are from Python, mines are from Rstudio, I had everything figured out for installing different environments, packages in R, ...

I have a database like this example here, and I need to calculate the average, the sum and the standard deviation of the 10 minutes prior to the event and also of the 10 minutes from the event. The ...