Re: [R] 'apply' for 0 or 1 element member.

2023-08-10 Thread Jeff Newmiller
Define mean0na <- function(x) { x[ 0 == x ] <- NA mean( x, na.rm = TRUE ) } and then use that instead of mean. On August 10, 2023 7:25:08 PM PDT, ani jaya wrote: >Hello, > >I try to calculate the mean of an array with a condition. My array is >B=c(181,101,420) in dimensions. And I want to

[R] 'apply' for 0 or 1 element member.

2023-08-10 Thread ani jaya
Hello, I try to calculate the mean of an array with a condition. My array is B=c(181,101,420) in dimensions. And I want to find a specific member in 3rd dimension (time monthly) based on a condition of another data frame, A =c(420). My final array would be C=c(181,101,12) which 12 is a monthly

[R-es] Expresión en un objeto

2023-08-10 Thread Griera
Hola a todos: Se me ha planteado un problema que no está ligado a ningún problema concreto. Es más teórico. Supongamos que tenemos tres variables: V1 <- c (47, 71, 41, 23, 83, 152, 82, 8, 160, 18) V2a <- c (NA, 36, 15, 5, 56, 18, NA, 5, NA, 5) V2b <- c (37, NA, 15, NA,

Re: [R] Technical Help Request for "Version Differences" (i.e., CYTOFKIT package)

2023-08-10 Thread Robert Baer
GIven that Cytofkit is removed from Bioconductor, and you seem new to everything, I would suggest like others already have that you install the most recent version of R for Windows https://cran.r-project.org/bin/windows/base/ and seek a more up-to-date package. For flow cytometry, I would