search for: v2a

Displaying 13 results from an estimated 13 matches for "v2a".

Did you mean: v2
2023 Aug 10
2
Expresión en un objeto
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, NA, NA, 90, NA, 161, NA) Supongamos que tengo la expresión (que no puedo asignarlo a ninguna variable): (ifelse (is.na (V2a) & ! is.na (V2b), V2b, V2a)) Supongamos que tengo que utilizar esta expres...
2023 Aug 12
1
Expresión en un objeto
...ción. Una función te permitiría encapsular la > > lógica de la expresión que quieres reutilizar y luego llamar a esa > función > > donde sea necesario. > > > > He aquí cómo podrías hacerlo: > > > > 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, NA, NA, 90, NA, 161, NA) > > > > # Definir una función que encapsula la lógica de la expresión > > myFunc <- function(V2a, V2b) { > > ifelse(is.na(V2a) & !is.na(V2b), V2b, V2a) > &...
2023 Aug 11
1
Expresión en un objeto
...o que estás pidiendo, puedes lograr el mismo resultado utilizando una función. Una función te permitiría encapsular la lógica de la expresión que quieres reutilizar y luego llamar a esa función donde sea necesario. He aquí cómo podrías hacerlo: 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, NA, NA, 90, NA, 161, NA) # Definir una función que encapsula la lógica de la expresión myFunc <- function(V2a, V2b) { ifelse(is.na(V2a) & !is.na(V2b), V2b, V2a) } # Luego puedes usar esa función donde necesites la e...
2023 Aug 11
1
Expresión en un objeto
...ismo > resultado utilizando una función. Una función te permitiría encapsular la > lógica de la expresión que quieres reutilizar y luego llamar a esa función > donde sea necesario. > > He aquí cómo podrías hacerlo: > > 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, NA, NA, 90, NA, 161, NA) > > # Definir una función que encapsula la lógica de la expresión > myFunc <- function(V2a, V2b) { > ifelse(is.na(V2a) & !is.na(V2b), V2b, V2a) > } > > # Luego pued...
2023 Aug 11
1
Expresión en un objeto
...o de 2023 19:36 Para: r-help-es en r-project.org Asunto: [R-es] Expresión en un objeto 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, NA, NA, 90, NA, 161, NA) Supongamos que tengo la expresión (que no puedo asignarlo a ninguna variable): (ifelse (is.na (V2a) & ! is.na (V2b), V2b, V2a)) Supongamos que tengo que utilizar esta expres...
2023 Jan 26
2
Resumen de R-help-es, Vol 167, Envío 10
Hola esta es una solución library(data.table) library(stringr) dt <- data.table( V1a = sample(c("1","0"), 10, TRUE) , V1b = sample(c("1","0"), 10, TRUE) , V2a = sample(c("1","0"), 10, TRUE) , V2b = sample(c("1","0"), 10, TRUE) , V3a = sample(c("1","0"), 10, TRUE) , V3b = sample(c("1","0"), 10, TRUE) , V4a = sampl...
2023 Jan 27
0
Resumen de R-help-es, Vol 167, Envío 10
...------ > > library(data.table) > > library(tidytable) > > library(stringi) > > > > df <- data.frame( V1a = sample(c("1","0"), 10, TRUE) > + , V1b = sample(c("1","0"), 10, TRUE) > + , V2a = sample(c("1","0"), 10, TRUE) > + , V2b = sample(c("1","0"), 10, TRUE)) > > df > V1a V1b V2a V2b > 1 1 0 1 1 > 2 1 1 0 1 > 3 0 0 0 0 > 4 1 0 1 0 > 5 0 1 0 0 > 6...
2023 Jan 28
0
Resumen de R-help-es, Vol 167, Envío 10
...------ > > library(data.table) > > library(tidytable) > > library(stringi) > > > > df <- data.frame( V1a = sample(c("1","0"), 10, TRUE) > + , V1b = sample(c("1","0"), 10, TRUE) > + , V2a = sample(c("1","0"), 10, TRUE) > + , V2b = sample(c("1","0"), 10, TRUE)) > > df > V1a V1b V2a V2b > 1 1 0 1 1 > 2 1 1 0 1 > 3 0 0 0 0 > 4 1 0 1 0 > 5 0 1 0 0 > 6...
2012 Dec 14
2
Manipulation of longitudinal data by row
..., and no value for the 3 variables) and are ignored. Eventually I have to determine mean time to resolution, mean follow-up time, etc and I think I can do that, but the first part is a bit beyond my coding skill. Suggestions appreciated. tC <- textConnection(" ID V1Date V1a V1b V1c V2date V2a V2b V2c V3date V3a V3b V3c 001 4/5/12 Yes Yes No 6/18/12 Yes No Yes NA NA NA NA 002 1/22/12 No No Yes 7/5/12 Yes No Yes NA NA NA NA 003 4/5/12 Yes No No 9/4/12 Yes No Yes 11/1/12 Yes No Yes 004 8/18/12 Yes Yes Yes 9/22/12 Yes No Yes NA NA NA NA 005 9/6/12 Yes No No NA NA NA NA 12/4/12 Yes No Yes &q...
2012 Jan 31
2
question of merging two dataframes
...nd B A has three variables and B also has three variables. I would like to merge these two database but the requirement to merge is that the value of the second column in database A is less than the value of the second column in database B. Is there a R code to do this? Thanks Dataframe A: V1a V2a V3a 1 2 3 5 2 3 4 6 3 Dataframe B: V1b V2b V3b 1 2 5 9 2 9 2 7 Dataframe C should be: V1a V2a V3a V1b V2b V3b...
2005 Jan 12
2
Inaccuracy in seq() function (PR#7503)
Full_Name: Vlad Stolin Version: R 2.0.0 OS: Windows 2000 Submission from: (NULL) (204.128.232.211) When generating the sequence using seq() function with non-integer numbers result is somewhat unpredictable. Example: > v1<-seq(1.60,1.90,.05) > v2<-c(1.60,1.65,1.70,1.75,1.80,1.85,1.90) > v1-v2 [1] 0.000000e+00 2.220446e-16 2.220446e-16 0.000000e+00 0.000000e+00 0.000000e+00
2011 Jul 14
1
Repating a loop of lm function with different columns of database
...ult I also wanted to get the p-value in a dataframe with three columns: Fitst column: analyte name (that´s the name of the column)Second column: pvalue of the first measure of the analte predicting the second measureThird column: The effect of time I copy a samller example: txt <- "V1a V2a V3a V1b V2b V3b TimeDifferenceDays2.42 72.4 3.75 2.46 55.4 4.44 6081.66 89.7 2.54 2.17 94.0 2.15 4192.45 112. 0.46 2.40 129.0 .42 7142.58 55.6 5.05 2.44 135.0 5.39 7212.61 332.0 22.6 3.55 238.0 16.4 729" Data <- read.table(textConnection(txt), header = TRUE) Thank you Jon Toledo, MD...
2010 Aug 27
2
plot data by class tag
Hello to all,I have a data file as Class V1 V2A -2.0 0.0A 0.9 0.7B 0.1 0.6C 4.1 0.4C 1.0 1.9B 1.1 0.5 I am plotting this data in R as V1 verses V2> temp<-read.table('temp.dat', header=T)> attach(temp)> plot (V1,V2, col='red')> text(x=V1, y=V2, labels=Class, pos=4) But I want to change the  'plotting symbol...