Displaying 9 results from an estimated 9 matches for "df_clean".
2017 Dec 14
2
help with recursive function
...max(abs(x), na.rm = TRUE)
}), 3)
data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
-norm_sd) %>% separate(key, c("field_rep", "treatment"),
"\\.") %>% spread(treatment, value) %>% mutate(outlier = NA)
df_clean <- with(data1, data1[norm_sd < 1, ])
datD <- with(data1, data1[norm_sd >= 1, ])
s <- split(datD, datD$uniqueid)
sdf <- lapply(s, function(x) {
data.frame(x, x$outlier <- ifelse(is.na(x$lp_norm), NA,
ifelse(abs(x$lp_norm) == x$norm_max, "...
2017 Dec 14
0
help with recursive function
...}), 3)
>
> data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
>
> -norm_sd) %>% separate(key, c("field_rep", "treatment"),
>
> "\\.") %>% spread(treatment, value) %>% mutate(outlier = NA)
>
> df_clean <- with(data1, data1[norm_sd < 1, ])
>
> datD <- with(data1, data1[norm_sd >= 1, ])
>
> s <- split(datD, datD$uniqueid)
>
> sdf <- lapply(s, function(x) {
>
> data.frame(x, x$outlier <- ifelse(is.na(x$lp_norm), NA,
>
>...
2017 Dec 14
2
help with recursive function
...data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
>>
>> -norm_sd) %>% separate(key, c("field_rep", "treatment"),
>>
>> "\\.") %>% spread(treatment, value) %>% mutate(outlier = NA)
>>
>> df_clean <- with(data1, data1[norm_sd < 1, ])
>>
>> datD <- with(data1, data1[norm_sd >= 1, ])
>>
>> s <- split(datD, datD$uniqueid)
>>
>> sdf <- lapply(s, function(x) {
>>
>> data.frame(x, x$outlier <- ifelse(is.na(x$l...
2017 Dec 14
2
help with recursive function
...x), na.rm = TRUE)
}), 3)
data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
-norm_sd) %>% separate(key, c("field_rep", "treatment"),
"\\.<file://.>") %>% spread(treatment, value) %>% mutate(outlier = NA)
df_clean <- with(data1, data1[norm_sd < 1, ])
datD <- with(data1, data1[norm_sd >= 1, ])
s <- split(datD, datD$uniqueid)
sdf <- lapply(s, function(x) {
data.frame(x, x$outlier <- ifelse(is.na<http://is.na>(x$lp_norm), NA,
ifelse(abs(x$lp_norm)...
2017 Dec 14
0
help with recursive function
...x), na.rm = TRUE)
}), 3)
data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
-norm_sd) %>% separate(key, c("field_rep", "treatment"),
"\\.<file://.>") %>% spread(treatment, value) %>% mutate(outlier = NA)
df_clean <- with(data1, data1[norm_sd < 1, ])
datD <- with(data1, data1[norm_sd >= 1, ])
s <- split(datD, datD$uniqueid)
sdf <- lapply(s, function(x) {
data.frame(x, x$outlier <- ifelse(is.na<http://is.na>(x$lp_norm), NA,
ifelse(abs(x$lp_norm)...
2017 Dec 14
0
help with recursive function
...}), 3)
>
> data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
>
> -norm_sd) %>% separate(key, c("field_rep", "treatment"),
>
> "\\.") %>% spread(treatment, value) %>% mutate(outlier = NA)
>
> df_clean <- with(data1, data1[norm_sd < 1, ])
>
> datD <- with(data1, data1[norm_sd >= 1, ])
>
> s <- split(datD, datD$uniqueid)
>
> sdf <- lapply(s, function(x) {
>
> data.frame(x, x$outlier <- ifelse(is.na(x$lp_norm), NA,
>
>...
2017 Dec 14
3
help with recursive function
...data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
>>
>> -norm_sd) %>% separate(key, c("field_rep", "treatment"),
>>
>> "\\.") %>% spread(treatment, value) %>% mutate(outlier = NA)
>>
>> df_clean <- with(data1, data1[norm_sd < 1, ])
>>
>> datD <- with(data1, data1[norm_sd >= 1, ])
>>
>> s <- split(datD, datD$uniqueid)
>>
>> sdf <- lapply(s, function(x) {
>>
>> data.frame(x, x$outlier <- ifelse(is.na(x$l...
2017 Dec 14
0
help with recursive function
...x), na.rm = TRUE)
}), 3)
data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
-norm_sd) %>% separate(key, c("field_rep", "treatment"),
"\\.<file://.>") %>% spread(treatment, value) %>% mutate(outlier = NA)
df_clean <- with(data1, data1[norm_sd < 1, ])
datD <- with(data1, data1[norm_sd >= 1, ])
s <- split(datD, datD$uniqueid)
sdf <- lapply(s, function(x) {
data.frame(x, x$outlier <- ifelse(is.na<http://is.na>(x$lp_norm), NA,
ifelse(abs(x$lp_norm)...
2017 Dec 14
1
help with recursive function
...t; data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
>
> -norm_sd) %>% separate(key, c("field_rep", "treatment"),
>
> "\\.<file://.>") %>% spread(treatment, value) %>% mutate(outlier =
> NA)
>
> df_clean <- with(data1, data1[norm_sd < 1, ])
>
> datD <- with(data1, data1[norm_sd >= 1, ])
>
> s <- split(datD, datD$uniqueid)
>
> sdf <- lapply(s, function(x) {
>
> data.frame(x, x$outlier <- ifelse(is.na<http://is.na>(x$lp_norm),
>...