help with recursive function

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

help with recursive function

DIGHE, NILESH [AG/2362]
Hi, I need some help with running a recursive function. I like to run funlp2 recursively.
When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".

I have never built a recursive function before so having trouble executing it in this case.  I would appreciate any help or guidance to resolve this issue. Please see my data and the three functions that I am using below.
Please note that calclp is the function I am running and the other two functions are within this calclp function.

# code:
Test<- calclp(dataset = dat)

# calclp function

calclp<- function (dataset)

{

    dat1 <- funlp1(dataset)

    recursive_funlp <- function(dataset = dat1, func = funlp2) {

        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%

            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%

            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",

            names(.)), funs(norm = round(scale(.), 3)))

        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, sd, na.rm = TRUE), 3)

        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, function(x) {

                max(abs(x), na.rm = TRUE)

            }), 3)

        stopifnot(any(!dat2$norm_sd) >= 1)

        if (any(!dat2$norm_sd) >= 1) {

            df1 <- dat1

            return(df1)

        }

        else {

            df2 <- recursive_funlp()

            return(df2)

        }

    }

    df3 <- recursive_funlp(dataset = dat1, func = funlp2)

    df3

}


# funlp1 function

funlp1<- function (dataset)

{

    dat2 <- dataset %>% select(field, set, ent_num, rep_num,

        lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%

        unite(field_rep, field, rep_num) %>% mutate(field_rep = paste(field_rep,

        "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%

        mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),

            3)))

    dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, sd, na.rm = TRUE), 3)

    dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, function(x) {

            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, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# funlp2 function

funlp2<-function (dataset)

{

    data1 <- dataset

    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, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# dataset
dput(dat)
structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
10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, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names = c("field",
"set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
-787L))

# session info

R version 3.4.1 (2017-06-30)

Platform: i386-w64-mingw32/i386 (32-bit)

Running under: Windows 7 x64 (build 7601) Service Pack 1



Matrix products: default



locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252

[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252



attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base



other attached packages:

[1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4



loaded via a namespace (and not attached):

 [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2         tools_3.4.1

 [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5    pkgconfig_2.0.1

[11] rlang_0.1.2      bindr_0.1

This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

Eric Berger
You seem to have a typo at this expression (and some others like it)

Namely, you write

any(!dat2$norm_sd) >= 1

when you possibly meant to write

!( any(dat2$norm_sd) >= 1 )

i.e. I think your ! seems to be in the wrong place.

HTH,
Eric


On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <
[hidden email]> wrote:

> Hi, I need some help with running a recursive function. I like to run
> funlp2 recursively.
> When I try to run recursive function in another function named "calclp" I
> get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".
>
> I have never built a recursive function before so having trouble executing
> it in this case.  I would appreciate any help or guidance to resolve this
> issue. Please see my data and the three functions that I am using below.
> Please note that calclp is the function I am running and the other two
> functions are within this calclp function.
>
> # code:
> Test<- calclp(dataset = dat)
>
> # calclp function
>
> calclp<- function (dataset)
>
> {
>
>     dat1 <- funlp1(dataset)
>
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>
>             names(.)), funs(norm = round(scale(.), 3)))
>
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, sd, na.rm = TRUE), 3)
>
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, function(x) {
>
>                 max(abs(x), na.rm = TRUE)
>
>             }), 3)
>
>         stopifnot(any(!dat2$norm_sd) >= 1)
>
>         if (any(!dat2$norm_sd) >= 1) {
>
>             df1 <- dat1
>
>             return(df1)
>
>         }
>
>         else {
>
>             df2 <- recursive_funlp()
>
>             return(df2)
>
>         }
>
>     }
>
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>
>     df3
>
> }
>
>
> # funlp1 function
>
> funlp1<- function (dataset)
>
> {
>
>     dat2 <- dataset %>% select(field, set, ent_num, rep_num,
>
>         lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%
>
>         unite(field_rep, field, rep_num) %>% mutate(field_rep =
> paste(field_rep,
>
>         "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%
>
>         mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),
>
>             3)))
>
>     dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, sd, na.rm = TRUE), 3)
>
>     dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, function(x) {
>
>             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, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # funlp2 function
>
> funlp2<-function (dataset)
>
> {
>
>     data1 <- dataset
>
>     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, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # dataset
> dput(dat)
> structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
> 34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
> 21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
> 67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
> 54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
> 55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
> 1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
> 41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
> 39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
> 24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
> 68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
> 26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
> 40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
> 12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
> 70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
> 18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
> 20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
> 54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
> 6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
> 11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
> 2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
> 26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
> 59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
> 4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
> 3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
> 45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
> 36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
> 47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
> 6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
> 56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
> 39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
> 12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
> 15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
> 47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
> 66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
> 43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
> 48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
> 4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
> 68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
> 28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
> 32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
> 38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
> 42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
> 65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
> 64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
> 34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
> 39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
> 18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
> 72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
> 35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
> 47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
> 46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
> 6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
> 11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
> 36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
> 46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
> 33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
> 2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
> 10L, 37L, 6L, 15L, 45L, 49L, 8L, 17L, 50L, 16L, 58L, 72L, 26L,
> 60L, 7L, 32L, 1L, 46L, 66L, 68L, 62L, 47L, 35L, 70L, 10L, 31L,
> 65L, 2L, 3L, 21L, 12L, 30L, 40L, 28L, 59L, 42L, 67L, 44L, 29L
> ), rep_num = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1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03, 42.5, 43.18, 41.32, 39.58,
> 40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
> 38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
> 42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
> 42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
> 43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
> 44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
> 42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
> 41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
> 46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
> 46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
> 45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
> 45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
> 46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
> 44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
> 43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
> 43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
> 39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
> 44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
> 44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
> 39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
> 42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
> 43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
> 36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
> 42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
> 39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
> 37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
> 38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
> 39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
> 40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
> 42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
> 37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
> 42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
> 39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
> 40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
> 42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
> 42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
> 37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
> 44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
> 41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
> 39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
> 40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
> 38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
> 40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
> 43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
> 45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
> 42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
> 39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
> 41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
> 41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
> 39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
> 42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
> 39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
> 43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
> 40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
> 39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
> 41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
> 40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
> 36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
> 39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
> 37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
> 44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
> 38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
> 43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
> 39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
> 41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
> 40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
> 39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
> 42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
> 41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
> 39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
> 40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
> 44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
> 47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
> 44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
> 40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
> 48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
> 39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
> 40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
> 40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
> 41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
> 42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
> 42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names =
> c("field",
> "set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
> -787L))
>
> # session info
>
> R version 3.4.1 (2017-06-30)
>
> Platform: i386-w64-mingw32/i386 (32-bit)
>
> Running under: Windows 7 x64 (build 7601) Service Pack 1
>
>
>
> Matrix products: default
>
>
>
> locale:
>
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252
>
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>
> [5] LC_TIME=English_United States.1252
>
>
>
> attached base packages:
>
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
>
>
> other attached packages:
>
> [1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4
>
>
>
> loaded via a namespace (and not attached):
>
>  [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2
>  tools_3.4.1
>
>  [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5
> pkgconfig_2.0.1
>
> [11] rlang_0.1.2      bindr_0.1
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

Eric Berger
My own typo ... whoops ...

!( any(dat2$norm_sd >= 1 ))



On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]> wrote:

> You seem to have a typo at this expression (and some others like it)
>
> Namely, you write
>
> any(!dat2$norm_sd) >= 1
>
> when you possibly meant to write
>
> !( any(dat2$norm_sd) >= 1 )
>
> i.e. I think your ! seems to be in the wrong place.
>
> HTH,
> Eric
>
>
> On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <
> [hidden email]> wrote:
>
>> Hi, I need some help with running a recursive function. I like to run
>> funlp2 recursively.
>> When I try to run recursive function in another function named "calclp" I
>> get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".
>>
>> I have never built a recursive function before so having trouble
>> executing it in this case.  I would appreciate any help or guidance to
>> resolve this issue. Please see my data and the three functions that I am
>> using below.
>> Please note that calclp is the function I am running and the other two
>> functions are within this calclp function.
>>
>> # code:
>> Test<- calclp(dataset = dat)
>>
>> # calclp function
>>
>> calclp<- function (dataset)
>>
>> {
>>
>>     dat1 <- funlp1(dataset)
>>
>>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>>
>>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>>
>>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>>
>>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
>> grep("_",
>>
>>             names(.)), funs(norm = round(scale(.), 3)))
>>
>>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>             1, sd, na.rm = TRUE), 3)
>>
>>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>             1, function(x) {
>>
>>                 max(abs(x), na.rm = TRUE)
>>
>>             }), 3)
>>
>>         stopifnot(any(!dat2$norm_sd) >= 1)
>>
>>         if (any(!dat2$norm_sd) >= 1) {
>>
>>             df1 <- dat1
>>
>>             return(df1)
>>
>>         }
>>
>>         else {
>>
>>             df2 <- recursive_funlp()
>>
>>             return(df2)
>>
>>         }
>>
>>     }
>>
>>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>>
>>     df3
>>
>> }
>>
>>
>> # funlp1 function
>>
>> funlp1<- function (dataset)
>>
>> {
>>
>>     dat2 <- dataset %>% select(field, set, ent_num, rep_num,
>>
>>         lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%
>>
>>         unite(field_rep, field, rep_num) %>% mutate(field_rep =
>> paste(field_rep,
>>
>>         "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%
>>
>>         mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),
>>
>>             3)))
>>
>>     dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>         1, sd, na.rm = TRUE), 3)
>>
>>     dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>         1, function(x) {
>>
>>             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, "yes", "no")),
>>
>>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>>
>>         x
>>
>>     })
>>
>>     sdf2 <- bind_rows(sdf)
>>
>>     all_dat <- bind_rows(df_clean, sdf2)
>>
>>     all_dat
>>
>> }
>>
>>
>> # funlp2 function
>>
>> funlp2<-function (dataset)
>>
>> {
>>
>>     data1 <- dataset
>>
>>     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, "yes", "no")),
>>
>>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>>
>>         x
>>
>>     })
>>
>>     sdf2 <- bind_rows(sdf)
>>
>>     all_dat <- bind_rows(df_clean, sdf2)
>>
>>     all_dat
>>
>> }
>>
>>
>> # dataset
>> dput(dat)
>> structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
>> 34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
>> 21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
>> 67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
>> 54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
>> 55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
>> 1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
>> 41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
>> 39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
>> 24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
>> 68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
>> 26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
>> 40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
>> 12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
>> 70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
>> 18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
>> 20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
>> 54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
>> 6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
>> 11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
>> 2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
>> 26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
>> 59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
>> 4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
>> 3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
>> 45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
>> 36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
>> 47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
>> 6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
>> 56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
>> 39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
>> 12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
>> 15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
>> 47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
>> 66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
>> 43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
>> 48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
>> 4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
>> 68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
>> 28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
>> 32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
>> 38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
>> 42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
>> 65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
>> 64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
>> 34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
>> 39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
>> 18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
>> 72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
>> 35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
>> 47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
>> 46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
>> 6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
>> 11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
>> 36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
>> 46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
>> 33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
>> 2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
>> 10L, 37L, 6L, 15L, 45L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L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
>> 38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
>> 42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
>> 40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
>> 37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
>> 40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
>> 38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
>> 42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
>> 42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
>> 43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
>> 44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
>> 42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
>> 41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
>> 46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
>> 46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
>> 45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
>> 45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
>> 46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
>> 44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
>> 43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
>> 43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
>> 39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
>> 44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
>> 44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
>> 39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
>> 42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
>> 43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
>> 36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
>> 42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
>> 39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
>> 37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
>> 38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
>> 39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
>> 40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
>> 42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
>> 37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
>> 42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
>> 39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
>> 40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
>> 42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
>> 42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
>> 37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
>> 44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
>> 41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
>> 39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
>> 40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
>> 38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
>> 40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
>> 43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
>> 45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
>> 42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
>> 39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
>> 41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
>> 41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
>> 39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
>> 42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
>> 39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
>> 43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
>> 40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
>> 39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
>> 41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
>> 40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
>> 36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
>> 39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
>> 37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
>> 44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
>> 38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
>> 43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
>> 39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
>> 41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
>> 40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
>> 39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
>> 42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
>> 41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
>> 39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
>> 40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
>> 44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
>> 47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
>> 44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
>> 40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
>> 48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
>> 39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
>> 40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
>> 40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
>> 41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
>> 42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
>> 42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names =
>> c("field",
>> "set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names =
>> c(NA,
>> -787L))
>>
>> # session info
>>
>> R version 3.4.1 (2017-06-30)
>>
>> Platform: i386-w64-mingw32/i386 (32-bit)
>>
>> Running under: Windows 7 x64 (build 7601) Service Pack 1
>>
>>
>>
>> Matrix products: default
>>
>>
>>
>> locale:
>>
>> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
>> States.1252
>>
>> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>>
>> [5] LC_TIME=English_United States.1252
>>
>>
>>
>> attached base packages:
>>
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>>
>>
>> other attached packages:
>>
>> [1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4
>>
>>
>>
>> loaded via a namespace (and not attached):
>>
>>  [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2
>>  tools_3.4.1
>>
>>  [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5
>> pkgconfig_2.0.1
>>
>> [11] rlang_0.1.2      bindr_0.1
>>
>> This email and any attachments were sent from a Monsanto email account
>> and may contain confidential and/or privileged information. If you are not
>> the intended recipient, please contact the sender and delete this email and
>> any attachments immediately. Any unauthorized use, including disclosing,
>> printing, storing, copying or distributing this email, is prohibited. All
>> emails and attachments sent to or from Monsanto email accounts may be
>> subject to monitoring, reading, and archiving by Monsanto, including its
>> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

DIGHE, NILESH [AG/2362]
Eric:  Thanks for taking time to look into my problem.  Despite of making the change you suggested, I am still getting the same error.  I am wondering if the logic I am using in the stopifnot and if functions is a problem.
I like the recursive function to stop whenever the norm_sd column has zero values that are above or equal to 1. Below is the calclp function after the changes you suggested.
Thanks. Nilesh

dput(calclp)
function (dataset)
{
    dat1 <- funlp1(dataset)
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",
            names(.)), funs(norm = round(scale(.), 3)))
        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, sd, na.rm = TRUE), 3)
        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, function(x) {
                max(abs(x), na.rm = TRUE)
            }), 3)
        stopifnot(!(any(dat2$norm_sd >= 1)))
        if (!(any(dat2$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
        else {
            df2 <- recursive_funlp()
            return(df2)
        }
    }
    df3 <- recursive_funlp(dataset = dat1, func = funlp2)
    df3
}


From: Eric Berger [mailto:[hidden email]]
Sent: Thursday, December 14, 2017 8:17 AM
To: DIGHE, NILESH [AG/2362] <[hidden email]>
Cc: r-help <[hidden email]>
Subject: Re: [R] help with recursive function

My own typo ... whoops ...

!( any(dat2$norm_sd >= 1 ))



On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]<mailto:[hidden email]>> wrote:
You seem to have a typo at this expression (and some others like it)

Namely, you write

any(!dat2$norm_sd) >= 1

when you possibly meant to write

!( any(dat2$norm_sd) >= 1 )

i.e. I think your ! seems to be in the wrong place.

HTH,
Eric


On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>> wrote:
Hi, I need some help with running a recursive function. I like to run funlp2 recursively.
When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".

I have never built a recursive function before so having trouble executing it in this case.  I would appreciate any help or guidance to resolve this issue. Please see my data and the three functions that I am using below.
Please note that calclp is the function I am running and the other two functions are within this calclp function.

# code:
Test<- calclp(dataset = dat)

# calclp function

calclp<- function (dataset)

{

    dat1 <- funlp1(dataset)

    recursive_funlp <- function(dataset = dat1, func = funlp2) {

        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%

            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%

            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",

            names(.)), funs(norm = round(scale(.), 3)))

        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, sd, na.rm = TRUE), 3)

        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, function(x) {

                max(abs(x), na.rm = TRUE)

            }), 3)

        stopifnot(any(!dat2$norm_sd) >= 1)

        if (any(!dat2$norm_sd) >= 1) {

            df1 <- dat1

            return(df1)

        }

        else {

            df2 <- recursive_funlp()

            return(df2)

        }

    }

    df3 <- recursive_funlp(dataset = dat1, func = funlp2)

    df3

}


# funlp1 function

funlp1<- function (dataset)

{

    dat2 <- dataset %>% select(field, set, ent_num, rep_num,

        lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%

        unite(field_rep, field, rep_num) %>% mutate(field_rep = paste(field_rep,

        "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%

        mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),

            3)))

    dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, sd, na.rm = TRUE), 3)

    dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, function(x) {

            max(abs(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) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# funlp2 function

funlp2<-function (dataset)

{

    data1 <- dataset

    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) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# dataset
dput(dat)
structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
10L, 37L, 6L, 15L, 45L, 49L, 8L, 17L, 50L, 16L, 58L, 72L, 26L,
60L, 7L, 32L, 1L, 46L, 66L, 68L, 62L, 47L, 35L, 70L, 10L, 31L,
65L, 2L, 3L, 21L, 12L, 30L, 40L, 28L, 59L, 42L, 67L, 44L, 29L
), rep_num = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1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L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names = c("field",
"set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
-787L))

# session info

R version 3.4.1 (2017-06-30)

Platform: i386-w64-mingw32/i386 (32-bit)

Running under: Windows 7 x64 (build 7601) Service Pack 1



Matrix products: default



locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252

[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252



attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base



other attached packages:

[1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4



loaded via a namespace (and not attached):

 [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2         tools_3.4.1

 [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5    pkgconfig_2.0.1

[11] rlang_0.1.2      bindr_0.1

This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email]<mailto:[hidden email]> mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

DIGHE, NILESH [AG/2362]
Hi, I accidently left out few lines of code from the calclp function.  Updated function is pasted below.
I am still getting the same error “Error: !(any(data1$norm_sd >= 1)) is not TRUE“

I would appreciate any help.
Nilesh
dput(calclp)
function (dataset)
{
    dat1 <- funlp1(dataset)
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",
            names(.)), funs(norm = round(scale(.), 3)))
        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, sd, na.rm = TRUE), 3)
        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, function(x) {
                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)
        stopifnot(!(any(data1$norm_sd >= 1)))
        if (!(any(data1$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
       else {
            df2 <- recursive_funlp()
            return(df2)
        }
    }
    df3 <- recursive_funlp(dataset = dat1, func = funlp2)
    df3
}


From: DIGHE, NILESH [AG/2362]
Sent: Thursday, December 14, 2017 9:01 AM
To: 'Eric Berger' <[hidden email]>
Cc: r-help <[hidden email]>
Subject: RE: [R] help with recursive function

Eric:  Thanks for taking time to look into my problem.  Despite of making the change you suggested, I am still getting the same error.  I am wondering if the logic I am using in the stopifnot and if functions is a problem.
I like the recursive function to stop whenever the norm_sd column has zero values that are above or equal to 1. Below is the calclp function after the changes you suggested.
Thanks. Nilesh

dput(calclp)
function (dataset)
{
    dat1 <- funlp1(dataset)
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",
            names(.)), funs(norm = round(scale(.), 3)))
        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, sd, na.rm = TRUE), 3)
        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, function(x) {
                max(abs(x), na.rm = TRUE)
            }), 3)
        stopifnot(!(any(dat2$norm_sd >= 1)))
        if (!(any(dat2$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
        else {
            df2 <- recursive_funlp()
            return(df2)
        }
    }
    df3 <- recursive_funlp(dataset = dat1, func = funlp2)
    df3
}


From: Eric Berger [mailto:[hidden email]]
Sent: Thursday, December 14, 2017 8:17 AM
To: DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>>
Cc: r-help <[hidden email]<mailto:[hidden email]>>
Subject: Re: [R] help with recursive function

My own typo ... whoops ...

!( any(dat2$norm_sd >= 1 ))



On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]<mailto:[hidden email]>> wrote:
You seem to have a typo at this expression (and some others like it)

Namely, you write

any(!dat2$norm_sd) >= 1

when you possibly meant to write

!( any(dat2$norm_sd) >= 1 )

i.e. I think your ! seems to be in the wrong place.

HTH,
Eric


On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>> wrote:
Hi, I need some help with running a recursive function. I like to run funlp2 recursively.
When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".

I have never built a recursive function before so having trouble executing it in this case.  I would appreciate any help or guidance to resolve this issue. Please see my data and the three functions that I am using below.
Please note that calclp is the function I am running and the other two functions are within this calclp function.

# code:
Test<- calclp(dataset = dat)

# calclp function

calclp<- function (dataset)

{

    dat1 <- funlp1(dataset)

    recursive_funlp <- function(dataset = dat1, func = funlp2) {

        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%

            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%

            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",

            names(.)), funs(norm = round(scale(.), 3)))

        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, sd, na.rm = TRUE), 3)

        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, function(x) {

                max(abs(x), na.rm = TRUE)

            }), 3)

        stopifnot(any(!dat2$norm_sd) >= 1)

        if (any(!dat2$norm_sd) >= 1) {

            df1 <- dat1

            return(df1)

        }

        else {

            df2 <- recursive_funlp()

            return(df2)

        }

    }

    df3 <- recursive_funlp(dataset = dat1, func = funlp2)

    df3

}


# funlp1 function

funlp1<- function (dataset)

{

    dat2 <- dataset %>% select(field, set, ent_num, rep_num,

        lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%

        unite(field_rep, field, rep_num) %>% mutate(field_rep = paste(field_rep,

        "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%

        mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),

            3)))

    dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, sd, na.rm = TRUE), 3)

    dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, function(x) {

            max(abs(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) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# funlp2 function

funlp2<-function (dataset)

{

    data1 <- dataset

    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) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# dataset
dput(dat)
structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
36L,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1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names = c("field",
"set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
-787L))

# session info

R version 3.4.1 (2017-06-30)

Platform: i386-w64-mingw32/i386 (32-bit)

Running under: Windows 7 x64 (build 7601) Service Pack 1



Matrix products: default



locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252

[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252



attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base



other attached packages:

[1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4



loaded via a namespace (and not attached):

 [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2         tools_3.4.1

 [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5    pkgconfig_2.0.1

[11] rlang_0.1.2      bindr_0.1

This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email]<mailto:[hidden email]> mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

Eric Berger
The message is coming from your stopifnot() condition being met.


On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] <
[hidden email]> wrote:

> Hi, I accidently left out few lines of code from the calclp function.
> Updated function is pasted below.
>
> I am still getting the same error “Error: !(any(data1$norm_sd >= 1)) is
> not TRUE“
>
>
>
> I would appreciate any help.
>
> Nilesh
>
> dput(calclp)
>
> function (dataset)
>
> {
>
>     dat1 <- funlp1(dataset)
>
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>
>             names(.)), funs(norm = round(scale(.), 3)))
>
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, sd, na.rm = TRUE), 3)
>
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, function(x) {
>
>                 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)
>
>         stopifnot(!(any(data1$norm_sd >= 1)))
>
>         if (!(any(data1$norm_sd >= 1))) {
>
>             df1 <- dat1
>
>             return(df1)
>
>         }
>
>        else {
>
>             df2 <- recursive_funlp()
>
>             return(df2)
>
>         }
>
>     }
>
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>
>     df3
>
> }
>
>
>
>
>
> *From:* DIGHE, NILESH [AG/2362]
> *Sent:* Thursday, December 14, 2017 9:01 AM
> *To:* 'Eric Berger' <[hidden email]>
> *Cc:* r-help <[hidden email]>
> *Subject:* RE: [R] help with recursive function
>
>
>
> Eric:  Thanks for taking time to look into my problem.  Despite of making
> the change you suggested, I am still getting the same error.  I am
> wondering if the logic I am using in the stopifnot and if functions is a
> problem.
>
> I like the recursive function to stop whenever the norm_sd column has zero
> values that are above or equal to 1. Below is the calclp function after the
> changes you suggested.
>
> Thanks. Nilesh
>
>
>
> dput(calclp)
>
> function (dataset)
>
> {
>
>     dat1 <- funlp1(dataset)
>
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>
>             names(.)), funs(norm = round(scale(.), 3)))
>
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, sd, na.rm = TRUE), 3)
>
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, function(x) {
>
>                 max(abs(x), na.rm = TRUE)
>
>             }), 3)
>
>         stopifnot(!(any(dat2$norm_sd >= 1)))
>
>         if (!(any(dat2$norm_sd >= 1))) {
>
>             df1 <- dat1
>
>             return(df1)
>
>         }
>
>         else {
>
>             df2 <- recursive_funlp()
>
>             return(df2)
>
>         }
>
>     }
>
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>
>     df3
>
> }
>
>
>
>
>
> *From:* Eric Berger [mailto:[hidden email] <[hidden email]>]
>
> *Sent:* Thursday, December 14, 2017 8:17 AM
> *To:* DIGHE, NILESH [AG/2362] <[hidden email]>
> *Cc:* r-help <[hidden email]>
> *Subject:* Re: [R] help with recursive function
>
>
>
> My own typo ... whoops ...
>
>
>
> !( any(dat2$norm_sd >= 1 ))
>
>
>
>
>
>
>
> On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]>
> wrote:
>
> You seem to have a typo at this expression (and some others like it)
>
>
>
> Namely, you write
>
>
>
> any(!dat2$norm_sd) >= 1
>
>
>
> when you possibly meant to write
>
>
>
> !( any(dat2$norm_sd) >= 1 )
>
>
>
> i.e. I think your ! seems to be in the wrong place.
>
>
>
> HTH,
> Eric
>
>
>
>
>
> On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <
> [hidden email]> wrote:
>
> Hi, I need some help with running a recursive function. I like to run
> funlp2 recursively.
> When I try to run recursive function in another function named "calclp" I
> get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".
>
> I have never built a recursive function before so having trouble executing
> it in this case.  I would appreciate any help or guidance to resolve this
> issue. Please see my data and the three functions that I am using below.
> Please note that calclp is the function I am running and the other two
> functions are within this calclp function.
>
> # code:
> Test<- calclp(dataset = dat)
>
> # calclp function
>
> calclp<- function (dataset)
>
> {
>
>     dat1 <- funlp1(dataset)
>
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>
>             names(.)), funs(norm = round(scale(.), 3)))
>
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, sd, na.rm = TRUE), 3)
>
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, function(x) {
>
>                 max(abs(x), na.rm = TRUE)
>
>             }), 3)
>
>         stopifnot(any(!dat2$norm_sd) >= 1)
>
>         if (any(!dat2$norm_sd) >= 1) {
>
>             df1 <- dat1
>
>             return(df1)
>
>         }
>
>         else {
>
>             df2 <- recursive_funlp()
>
>             return(df2)
>
>         }
>
>     }
>
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>
>     df3
>
> }
>
>
> # funlp1 function
>
> funlp1<- function (dataset)
>
> {
>
>     dat2 <- dataset %>% select(field, set, ent_num, rep_num,
>
>         lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%
>
>         unite(field_rep, field, rep_num) %>% mutate(field_rep =
> paste(field_rep,
>
>         "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%
>
>         mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),
>
>             3)))
>
>     dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, sd, na.rm = TRUE), 3)
>
>     dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, function(x) {
>
>             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, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # funlp2 function
>
> funlp2<-function (dataset)
>
> {
>
>     data1 <- dataset
>
>     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, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # dataset
> dput(dat)
> structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
> 34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
> 21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
> 67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
> 54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
> 55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
> 1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
> 41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
> 39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
> 24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
> 68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
> 26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
> 40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
> 12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
> 70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
> 18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
> 20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
> 54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
> 6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
> 11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
> 2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
> 26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
> 59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
> 4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
> 3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
> 45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
> 36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
> 47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
> 6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
> 56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
> 39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
> 12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
> 15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
> 47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
> 66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
> 43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
> 48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
> 4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
> 68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
> 28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
> 32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
> 38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
> 42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
> 65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
> 64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
> 34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
> 39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
> 18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
> 72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
> 35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
> 47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
> 46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
> 6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
> 11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
> 36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
> 46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
> 33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
> 2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
> 10L, 37L, 6L, 15L, 45L, 49L, 8L, 17L, 50L, 16L, 58L, 72L, 26L,
> 60L, 7L, 32L, 1L, 46L, 66L, 68L, 62L, 47L, 35L, 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 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
> 38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
> 42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
> 40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
> 37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
> 40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
> 38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
> 42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
> 42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
> 43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
> 44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
> 42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
> 41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
> 46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
> 46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
> 45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
> 45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
> 46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
> 44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
> 43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
> 43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
> 39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
> 44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
> 44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
> 39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
> 42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
> 43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
> 36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
> 42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
> 39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
> 37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
> 38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
> 39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
> 40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
> 42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
> 37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
> 42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
> 39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
> 40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
> 42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
> 42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
> 37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
> 44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
> 41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
> 39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
> 40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
> 38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
> 40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
> 43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
> 45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
> 42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
> 39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
> 41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
> 41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
> 39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
> 42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
> 39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
> 43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
> 40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
> 39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
> 41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
> 40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
> 36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
> 39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
> 37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
> 44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
> 38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
> 43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
> 39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
> 41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
> 40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
> 39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
> 42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
> 41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
> 39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
> 40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
> 44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
> 47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
> 44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
> 40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
> 48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
> 39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
> 40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
> 40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
> 41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
> 42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
> 42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names =
> c("field",
> "set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
> -787L))
>
> # session info
>
> R version 3.4.1 (2017-06-30)
>
> Platform: i386-w64-mingw32/i386 (32-bit)
>
> Running under: Windows 7 x64 (build 7601) Service Pack 1
>
>
>
> Matrix products: default
>
>
>
> locale:
>
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252
>
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>
> [5] LC_TIME=English_United States.1252
>
>
>
> attached base packages:
>
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
>
>
> other attached packages:
>
> [1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4
>
>
>
> loaded via a namespace (and not attached):
>
>  [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2
>  tools_3.4.1
>
>  [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5
> pkgconfig_2.0.1
>
> [11] rlang_0.1.2      bindr_0.1
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>
>
>
>
> This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>
>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

Eric Berger
If you are trying to understand why the "stopifnot" condition is met you
can replace it by something like:

if ( any(dat2$norm_sd >= 1) )
   browser()

This will put you in a debugging session where you can examine your
variables, e.g.

> dat$norm_sd

HTH,
Eric



On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <[hidden email]> wrote:

> The message is coming from your stopifnot() condition being met.
>
>
> On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] <
> [hidden email]> wrote:
>
>> Hi, I accidently left out few lines of code from the calclp function.
>> Updated function is pasted below.
>>
>> I am still getting the same error “Error: !(any(data1$norm_sd >= 1)) is
>> not TRUE“
>>
>>
>>
>> I would appreciate any help.
>>
>> Nilesh
>>
>> dput(calclp)
>>
>> function (dataset)
>>
>> {
>>
>>     dat1 <- funlp1(dataset)
>>
>>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>>
>>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>>
>>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>>
>>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
>> grep("_",
>>
>>             names(.)), funs(norm = round(scale(.), 3)))
>>
>>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>             1, sd, na.rm = TRUE), 3)
>>
>>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm",
>> names(dat2))],
>>
>>             1, function(x) {
>>
>>                 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)
>>
>>         stopifnot(!(any(data1$norm_sd >= 1)))
>>
>>         if (!(any(data1$norm_sd >= 1))) {
>>
>>             df1 <- dat1
>>
>>             return(df1)
>>
>>         }
>>
>>        else {
>>
>>             df2 <- recursive_funlp()
>>
>>             return(df2)
>>
>>         }
>>
>>     }
>>
>>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>>
>>     df3
>>
>> }
>>
>>
>>
>>
>>
>> *From:* DIGHE, NILESH [AG/2362]
>> *Sent:* Thursday, December 14, 2017 9:01 AM
>> *To:* 'Eric Berger' <[hidden email]>
>> *Cc:* r-help <[hidden email]>
>> *Subject:* RE: [R] help with recursive function
>>
>>
>>
>> Eric:  Thanks for taking time to look into my problem.  Despite of making
>> the change you suggested, I am still getting the same error.  I am
>> wondering if the logic I am using in the stopifnot and if functions is a
>> problem.
>>
>> I like the recursive function to stop whenever the norm_sd column has
>> zero values that are above or equal to 1. Below is the calclp function
>> after the changes you suggested.
>>
>> Thanks. Nilesh
>>
>>
>>
>> dput(calclp)
>>
>> function (dataset)
>>
>> {
>>
>>     dat1 <- funlp1(dataset)
>>
>>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>>
>>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>>
>>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>>
>>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
>> grep("_",
>>
>>             names(.)), funs(norm = round(scale(.), 3)))
>>
>>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>             1, sd, na.rm = TRUE), 3)
>>
>>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm",
>> names(dat2))],
>>
>>             1, function(x) {
>>
>>                 max(abs(x), na.rm = TRUE)
>>
>>             }), 3)
>>
>>         stopifnot(!(any(dat2$norm_sd >= 1)))
>>
>>         if (!(any(dat2$norm_sd >= 1))) {
>>
>>             df1 <- dat1
>>
>>             return(df1)
>>
>>         }
>>
>>         else {
>>
>>             df2 <- recursive_funlp()
>>
>>             return(df2)
>>
>>         }
>>
>>     }
>>
>>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>>
>>     df3
>>
>> }
>>
>>
>>
>>
>>
>> *From:* Eric Berger [mailto:[hidden email] <[hidden email]>]
>>
>> *Sent:* Thursday, December 14, 2017 8:17 AM
>> *To:* DIGHE, NILESH [AG/2362] <[hidden email]>
>> *Cc:* r-help <[hidden email]>
>> *Subject:* Re: [R] help with recursive function
>>
>>
>>
>> My own typo ... whoops ...
>>
>>
>>
>> !( any(dat2$norm_sd >= 1 ))
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]>
>> wrote:
>>
>> You seem to have a typo at this expression (and some others like it)
>>
>>
>>
>> Namely, you write
>>
>>
>>
>> any(!dat2$norm_sd) >= 1
>>
>>
>>
>> when you possibly meant to write
>>
>>
>>
>> !( any(dat2$norm_sd) >= 1 )
>>
>>
>>
>> i.e. I think your ! seems to be in the wrong place.
>>
>>
>>
>> HTH,
>> Eric
>>
>>
>>
>>
>>
>> On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <
>> [hidden email]> wrote:
>>
>> Hi, I need some help with running a recursive function. I like to run
>> funlp2 recursively.
>> When I try to run recursive function in another function named "calclp" I
>> get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".
>>
>> I have never built a recursive function before so having trouble
>> executing it in this case.  I would appreciate any help or guidance to
>> resolve this issue. Please see my data and the three functions that I am
>> using below.
>> Please note that calclp is the function I am running and the other two
>> functions are within this calclp function.
>>
>> # code:
>> Test<- calclp(dataset = dat)
>>
>> # calclp function
>>
>> calclp<- function (dataset)
>>
>> {
>>
>>     dat1 <- funlp1(dataset)
>>
>>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>>
>>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>>
>>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>>
>>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
>> grep("_",
>>
>>             names(.)), funs(norm = round(scale(.), 3)))
>>
>>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>             1, sd, na.rm = TRUE), 3)
>>
>>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>             1, function(x) {
>>
>>                 max(abs(x), na.rm = TRUE)
>>
>>             }), 3)
>>
>>         stopifnot(any(!dat2$norm_sd) >= 1)
>>
>>         if (any(!dat2$norm_sd) >= 1) {
>>
>>             df1 <- dat1
>>
>>             return(df1)
>>
>>         }
>>
>>         else {
>>
>>             df2 <- recursive_funlp()
>>
>>             return(df2)
>>
>>         }
>>
>>     }
>>
>>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>>
>>     df3
>>
>> }
>>
>>
>> # funlp1 function
>>
>> funlp1<- function (dataset)
>>
>> {
>>
>>     dat2 <- dataset %>% select(field, set, ent_num, rep_num,
>>
>>         lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%
>>
>>         unite(field_rep, field, rep_num) %>% mutate(field_rep =
>> paste(field_rep,
>>
>>         "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%
>>
>>         mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),
>>
>>             3)))
>>
>>     dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>         1, sd, na.rm = TRUE), 3)
>>
>>     dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>>
>>         1, function(x) {
>>
>>             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, "yes", "no")),
>>
>>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>>
>>         x
>>
>>     })
>>
>>     sdf2 <- bind_rows(sdf)
>>
>>     all_dat <- bind_rows(df_clean, sdf2)
>>
>>     all_dat
>>
>> }
>>
>>
>> # funlp2 function
>>
>> funlp2<-function (dataset)
>>
>> {
>>
>>     data1 <- dataset
>>
>>     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, "yes", "no")),
>>
>>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>>
>>         x
>>
>>     })
>>
>>     sdf2 <- bind_rows(sdf)
>>
>>     all_dat <- bind_rows(df_clean, sdf2)
>>
>>     all_dat
>>
>> }
>>
>>
>> # dataset
>> dput(dat)
>> structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
>> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
>> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
>> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
>> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
>> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
>> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
>> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
>> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
>> "MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
>> "28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
>> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
>> "seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
>> 34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
>> 21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
>> 67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
>> 54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
>> 55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
>> 1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
>> 41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
>> 39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
>> 24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
>> 68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
>> 26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
>> 40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
>> 12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
>> 70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
>> 18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
>> 20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
>> 54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
>> 6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
>> 11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
>> 2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
>> 26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
>> 59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
>> 4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
>> 3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
>> 45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
>> 36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
>> 47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
>> 6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
>> 56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
>> 39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
>> 12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
>> 15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
>> 47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
>> 66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
>> 43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
>> 48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
>> 4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
>> 68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
>> 28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
>> 32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
>> 38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
>> 42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
>> 65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
>> 64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
>> 34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
>> 39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
>> 18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
>> 72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
>> 35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
>> 47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
>> 46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
>> 6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
>> 11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
>> 36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
>> 46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
>> 33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
>> 2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
>> 10L, 37L, 6L, 15L, 45L, 49L, 8L, 17L, 50L, 16L, 58L, 72L, 26L,
>> 60L, 7L, 32L, 1L, 46L, 66L, 68L, 62L, 47L, 35L, 70L, 10L, 31L,
>> 65L, 2L, 3L, 21L, 12L, 30L, 40L, 28L, 59L, 42L, 67L, 44L, 29L
>> ), rep_num = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,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L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
>> 1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
>> 38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
>> 42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
>> 40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
>> 37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
>> 40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
>> 38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
>> 42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
>> 42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
>> 43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
>> 44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
>> 42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
>> 41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
>> 46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
>> 46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
>> 45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
>> 45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
>> 46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
>> 44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
>> 43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
>> 43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
>> 39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
>> 44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
>> 44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
>> 39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
>> 42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
>> 43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
>> 36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
>> 42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
>> 39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
>> 37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
>> 38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
>> 39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
>> 40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
>> 42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
>> 37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
>> 42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
>> 39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
>> 40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
>> 42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
>> 42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
>> 37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
>> 44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
>> 41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
>> 39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
>> 40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
>> 38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
>> 40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
>> 43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
>> 45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
>> 42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
>> 39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
>> 41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
>> 41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
>> 39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
>> 42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
>> 39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
>> 43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
>> 40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
>> 39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
>> 41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
>> 40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
>> 36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
>> 39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
>> 37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
>> 44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
>> 38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
>> 43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
>> 39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
>> 41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
>> 40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
>> 39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
>> 42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
>> 41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
>> 39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
>> 40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
>> 44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
>> 47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
>> 44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
>> 40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
>> 48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
>> 39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
>> 40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
>> 40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
>> 41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
>> 42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
>> 42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names =
>> c("field",
>> "set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names =
>> c(NA,
>> -787L))
>>
>> # session info
>>
>> R version 3.4.1 (2017-06-30)
>>
>> Platform: i386-w64-mingw32/i386 (32-bit)
>>
>> Running under: Windows 7 x64 (build 7601) Service Pack 1
>>
>>
>>
>> Matrix products: default
>>
>>
>>
>> locale:
>>
>> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
>> States.1252
>>
>> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>>
>> [5] LC_TIME=English_United States.1252
>>
>>
>>
>> attached base packages:
>>
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>>
>>
>> other attached packages:
>>
>> [1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4
>>
>>
>>
>> loaded via a namespace (and not attached):
>>
>>  [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2
>>  tools_3.4.1
>>
>>  [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5
>> pkgconfig_2.0.1
>>
>> [11] rlang_0.1.2      bindr_0.1
>>
>> This email and any attachments were sent from a Monsanto email account
>> and may contain confidential and/or privileged information. If you are not
>> the intended recipient, please contact the sender and delete this email and
>> any attachments immediately. Any unauthorized use, including disclosing,
>> printing, storing, copying or distributing this email, is prohibited. All
>> emails and attachments sent to or from Monsanto email accounts may be
>> subject to monitoring, reading, and archiving by Monsanto, including its
>> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>>
>>         [[alternative HTML version deleted]]
>>
>> ______________________________________________
>> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posti
>> ng-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>
>>
>>
>>
>>
>>
>> This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.
>>
>>
>>
>>
>

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

DIGHE, NILESH [AG/2362]
Eric:  I will try and see if I can figure out the issue by debugging as you suggested. I don’t know why my code after stopifnot is not getting executed where I like the code to run the funlp2 function when the if statement is TRUE but when it is false, I like it to keep running until the stopifnot condition is met.

When the stopifnot condition is met, I like to get the output from if statement saved.
Anyway,  I will keep trying.
Again, Thanks for your help!
Nilesh

From: Eric Berger [mailto:[hidden email]]
Sent: Thursday, December 14, 2017 10:29 AM
To: DIGHE, NILESH [AG/2362] <[hidden email]>
Cc: r-help <[hidden email]>
Subject: Re: [R] help with recursive function

If you are trying to understand why the "stopifnot" condition is met you can replace it by something like:

if ( any(dat2$norm_sd >= 1) )
   browser()

This will put you in a debugging session where you can examine your variables, e.g.

> dat$norm_sd

HTH,
Eric



On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <[hidden email]<mailto:[hidden email]>> wrote:
The message is coming from your stopifnot() condition being met.


On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>> wrote:
Hi, I accidently left out few lines of code from the calclp function.  Updated function is pasted below.
I am still getting the same error “Error: !(any(data1$norm_sd >= 1)) is not TRUE“

I would appreciate any help.
Nilesh
dput(calclp)
function (dataset)
{
    dat1 <- funlp1(dataset)
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",
            names(.)), funs(norm = round(scale(.), 3)))
        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, sd, na.rm = TRUE), 3)
        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, function(x) {
                max(abs(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)
        stopifnot(!(any(data1$norm_sd >= 1)))
        if (!(any(data1$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
       else {
            df2 <- recursive_funlp()
            return(df2)
        }
    }
    df3 <- recursive_funlp(dataset = dat1, func = funlp2)
    df3
}


From: DIGHE, NILESH [AG/2362]
Sent: Thursday, December 14, 2017 9:01 AM
To: 'Eric Berger' <[hidden email]<mailto:[hidden email]>>
Cc: r-help <[hidden email]<mailto:[hidden email]>>
Subject: RE: [R] help with recursive function

Eric:  Thanks for taking time to look into my problem.  Despite of making the change you suggested, I am still getting the same error.  I am wondering if the logic I am using in the stopifnot and if functions is a problem.
I like the recursive function to stop whenever the norm_sd column has zero values that are above or equal to 1. Below is the calclp function after the changes you suggested.
Thanks. Nilesh

dput(calclp)
function (dataset)
{
    dat1 <- funlp1(dataset)
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",
            names(.)), funs(norm = round(scale(.), 3)))
        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, sd, na.rm = TRUE), 3)
        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, function(x) {
                max(abs(x), na.rm = TRUE)
            }), 3)
        stopifnot(!(any(dat2$norm_sd >= 1)))
        if (!(any(dat2$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
        else {
            df2 <- recursive_funlp()
            return(df2)
        }
    }
    df3 <- recursive_funlp(dataset = dat1, func = funlp2)
    df3
}


From: Eric Berger [mailto:[hidden email]]
Sent: Thursday, December 14, 2017 8:17 AM
To: DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>>
Cc: r-help <[hidden email]<mailto:[hidden email]>>
Subject: Re: [R] help with recursive function

My own typo ... whoops ...

!( any(dat2$norm_sd >= 1 ))



On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]<mailto:[hidden email]>> wrote:
You seem to have a typo at this expression (and some others like it)

Namely, you write

any(!dat2$norm_sd) >= 1

when you possibly meant to write

!( any(dat2$norm_sd) >= 1 )

i.e. I think your ! seems to be in the wrong place.

HTH,
Eric


On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>> wrote:
Hi, I need some help with running a recursive function. I like to run funlp2 recursively.
When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".

I have never built a recursive function before so having trouble executing it in this case.  I would appreciate any help or guidance to resolve this issue. Please see my data and the three functions that I am using below.
Please note that calclp is the function I am running and the other two functions are within this calclp function.

# code:
Test<- calclp(dataset = dat)

# calclp function

calclp<- function (dataset)

{

    dat1 <- funlp1(dataset)

    recursive_funlp <- function(dataset = dat1, func = funlp2) {

        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%

            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%

            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",

            names(.)), funs(norm = round(scale(.), 3)))

        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, sd, na.rm = TRUE), 3)

        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, function(x) {

                max(abs(x), na.rm = TRUE)

            }), 3)

        stopifnot(any(!dat2$norm_sd) >= 1)

        if (any(!dat2$norm_sd) >= 1) {

            df1 <- dat1

            return(df1)

        }

        else {

            df2 <- recursive_funlp()

            return(df2)

        }

    }

    df3 <- recursive_funlp(dataset = dat1, func = funlp2)

    df3

}


# funlp1 function

funlp1<- function (dataset)

{

    dat2 <- dataset %>% select(field, set, ent_num, rep_num,

        lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%

        unite(field_rep, field, rep_num) %>% mutate(field_rep = paste(field_rep,

        "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%

        mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),

            3)))

    dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, sd, na.rm = TRUE), 3)

    dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, function(x) {

            max(abs(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) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# funlp2 function

funlp2<-function (dataset)

{

    data1 <- dataset

    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) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# dataset
dput(dat)
structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
10L, 37L, 6L, 15L, 45L, 49L, 8L, 17L, 50L, 16L, 58L, 72L, 26L,
60L, 7L, 32L, 1L, 46L, 66L, 68L, 62L, 47L, 35L, 70L, 10L, 31L,
65L, 2L, 3L, 21L, 12L, 30L, 40L, 28L, 59L, 42L, 67L, 44L, 29L
), rep_num = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 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
42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names = c("field",
"set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
-787L))

# session info

R version 3.4.1 (2017-06-30)

Platform: i386-w64-mingw32/i386 (32-bit)

Running under: Windows 7 x64 (build 7601) Service Pack 1



Matrix products: default



locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252

[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252



attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base



other attached packages:

[1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4



loaded via a namespace (and not attached):

 [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2         tools_3.4.1

 [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5    pkgconfig_2.0.1

[11] rlang_0.1.2      bindr_0.1

This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email]<mailto:[hidden email]> mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.






This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.





This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

R help mailing list-2
Your code contains the lines
        stopifnot(!(any(data1$norm_sd >= 1)))
        if            (!(any(data1$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }

stop() "throws an error", causing the current function and all functions in
the call
stack to abort and return nothing.  It does not mean to stop now and return
a result.
Does the function give the correct results if you just leave out the
stopifnot line?


Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Dec 14, 2017 at 9:11 AM, DIGHE, NILESH [AG/2362] <
[hidden email]> wrote:

> Eric:  I will try and see if I can figure out the issue by debugging as
> you suggested. I don’t know why my code after stopifnot is not getting
> executed where I like the code to run the funlp2 function when the if
> statement is TRUE but when it is false, I like it to keep running until the
> stopifnot condition is met.
>
> When the stopifnot condition is met, I like to get the output from if
> statement saved.
> Anyway,  I will keep trying.
> Again, Thanks for your help!
> Nilesh
>
> From: Eric Berger [mailto:[hidden email]]
> Sent: Thursday, December 14, 2017 10:29 AM
> To: DIGHE, NILESH [AG/2362] <[hidden email]>
> Cc: r-help <[hidden email]>
> Subject: Re: [R] help with recursive function
>
> If you are trying to understand why the "stopifnot" condition is met you
> can replace it by something like:
>
> if ( any(dat2$norm_sd >= 1) )
>    browser()
>
> This will put you in a debugging session where you can examine your
> variables, e.g.
>
> > dat$norm_sd
>
> HTH,
> Eric
>
>
>
> On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <[hidden email]
> <mailto:[hidden email]>> wrote:
> The message is coming from your stopifnot() condition being met.
>
>
> On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] <
> [hidden email]<mailto:[hidden email]>> wrote:
> Hi, I accidently left out few lines of code from the calclp function.
> Updated function is pasted below.
> I am still getting the same error “Error: !(any(data1$norm_sd >= 1)) is
> not TRUE“
>
> I would appreciate any help.
> Nilesh
> dput(calclp)
> function (dataset)
> {
>     dat1 <- funlp1(dataset)
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>             names(.)), funs(norm = round(scale(.), 3)))
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, sd, na.rm = TRUE), 3)
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, function(x) {
>                 max(abs(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)
>         stopifnot(!(any(data1$norm_sd >= 1)))
>         if (!(any(data1$norm_sd >= 1))) {
>             df1 <- dat1
>             return(df1)
>         }
>        else {
>             df2 <- recursive_funlp()
>             return(df2)
>         }
>     }
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>     df3
> }
>
>
> From: DIGHE, NILESH [AG/2362]
> Sent: Thursday, December 14, 2017 9:01 AM
> To: 'Eric Berger' <[hidden email]<mailto:[hidden email]>>
> Cc: r-help <[hidden email]<mailto:[hidden email]>>
> Subject: RE: [R] help with recursive function
>
> Eric:  Thanks for taking time to look into my problem.  Despite of making
> the change you suggested, I am still getting the same error.  I am
> wondering if the logic I am using in the stopifnot and if functions is a
> problem.
> I like the recursive function to stop whenever the norm_sd column has zero
> values that are above or equal to 1. Below is the calclp function after the
> changes you suggested.
> Thanks. Nilesh
>
> dput(calclp)
> function (dataset)
> {
>     dat1 <- funlp1(dataset)
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>             names(.)), funs(norm = round(scale(.), 3)))
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, sd, na.rm = TRUE), 3)
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, function(x) {
>                 max(abs(x), na.rm = TRUE)
>             }), 3)
>         stopifnot(!(any(dat2$norm_sd >= 1)))
>         if (!(any(dat2$norm_sd >= 1))) {
>             df1 <- dat1
>             return(df1)
>         }
>         else {
>             df2 <- recursive_funlp()
>             return(df2)
>         }
>     }
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>     df3
> }
>
>
> From: Eric Berger [mailto:[hidden email]]
> Sent: Thursday, December 14, 2017 8:17 AM
> To: DIGHE, NILESH [AG/2362] <[hidden email]<mailto:
> [hidden email]>>
> Cc: r-help <[hidden email]<mailto:[hidden email]>>
> Subject: Re: [R] help with recursive function
>
> My own typo ... whoops ...
>
> !( any(dat2$norm_sd >= 1 ))
>
>
>
> On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]
> <mailto:[hidden email]>> wrote:
> You seem to have a typo at this expression (and some others like it)
>
> Namely, you write
>
> any(!dat2$norm_sd) >= 1
>
> when you possibly meant to write
>
> !( any(dat2$norm_sd) >= 1 )
>
> i.e. I think your ! seems to be in the wrong place.
>
> HTH,
> Eric
>
>
> On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <
> [hidden email]<mailto:[hidden email]>> wrote:
> Hi, I need some help with running a recursive function. I like to run
> funlp2 recursively.
> When I try to run recursive function in another function named "calclp" I
> get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".
>
> I have never built a recursive function before so having trouble executing
> it in this case.  I would appreciate any help or guidance to resolve this
> issue. Please see my data and the three functions that I am using below.
> Please note that calclp is the function I am running and the other two
> functions are within this calclp function.
>
> # code:
> Test<- calclp(dataset = dat)
>
> # calclp function
>
> calclp<- function (dataset)
>
> {
>
>     dat1 <- funlp1(dataset)
>
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>
>             names(.)), funs(norm = round(scale(.), 3)))
>
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, sd, na.rm = TRUE), 3)
>
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, function(x) {
>
>                 max(abs(x), na.rm = TRUE)
>
>             }), 3)
>
>         stopifnot(any(!dat2$norm_sd) >= 1)
>
>         if (any(!dat2$norm_sd) >= 1) {
>
>             df1 <- dat1
>
>             return(df1)
>
>         }
>
>         else {
>
>             df2 <- recursive_funlp()
>
>             return(df2)
>
>         }
>
>     }
>
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>
>     df3
>
> }
>
>
> # funlp1 function
>
> funlp1<- function (dataset)
>
> {
>
>     dat2 <- dataset %>% select(field, set, ent_num, rep_num,
>
>         lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%
>
>         unite(field_rep, field, rep_num) %>% mutate(field_rep =
> paste(field_rep,
>
>         "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%
>
>         mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),
>
>             3)))
>
>     dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, sd, na.rm = TRUE), 3)
>
>     dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, function(x) {
>
>             max(abs(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) == x$norm_max, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # funlp2 function
>
> funlp2<-function (dataset)
>
> {
>
>     data1 <- dataset
>
>     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) == x$norm_max, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # dataset
> dput(dat)
> structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
> 34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
> 21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
> 67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
> 54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
> 55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
> 1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
> 41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
> 39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
> 24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
> 68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
> 26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
> 40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
> 12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
> 70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
> 18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
> 20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
> 54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
> 6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
> 11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
> 2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
> 26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
> 59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
> 4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
> 3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
> 45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
> 36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
> 47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
> 6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
> 56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
> 39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
> 12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
> 15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
> 47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
> 66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
> 43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
> 48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
> 4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
> 68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
> 28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
> 32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
> 38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
> 42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
> 65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
> 64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
> 34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
> 39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
> 18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
> 72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
> 35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
> 47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
> 46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
> 6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
> 11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
> 36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20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, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
> 38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
> 42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
> 40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
> 37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
> 40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
> 38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
> 42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
> 42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
> 43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
> 44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
> 42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
> 41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
> 46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
> 46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
> 45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
> 45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
> 46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
> 44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
> 43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
> 43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
> 39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
> 44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
> 44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
> 39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
> 42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
> 43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
> 36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
> 42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
> 39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
> 37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
> 38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
> 39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
> 40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
> 42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
> 37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
> 42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
> 39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
> 40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
> 42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
> 42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
> 37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
> 44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
> 41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
> 39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
> 40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
> 38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
> 40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
> 43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
> 45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
> 42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
> 39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
> 41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
> 41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
> 39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
> 42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
> 39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
> 43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
> 40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
> 39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
> 41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
> 40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
> 36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
> 39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
> 37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
> 44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
> 38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
> 43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
> 39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
> 41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
> 40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
> 39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
> 42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
> 41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
> 39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
> 40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
> 44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
> 47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
> 44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
> 40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
> 48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
> 39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
> 40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
> 40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
> 41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
> 42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
> 42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names =
> c("field",
> "set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
> -787L))
>
> # session info
>
> R version 3.4.1 (2017-06-30)
>
> Platform: i386-w64-mingw32/i386 (32-bit)
>
> Running under: Windows 7 x64 (build 7601) Service Pack 1
>
>
>
> Matrix products: default
>
>
>
> locale:
>
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252
>
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>
> [5] LC_TIME=English_United States.1252
>
>
>
> attached base packages:
>
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
>
>
> other attached packages:
>
> [1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4
>
>
>
> loaded via a namespace (and not attached):
>
>  [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2
>  tools_3.4.1
>
>  [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5
> pkgconfig_2.0.1
>
> [11] rlang_0.1.2      bindr_0.1
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email]<mailto:[hidden email]> mailing list -- To
> UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>
>
>
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>
>
>
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

DIGHE, NILESH [AG/2362]
When I run the code without stopifnot, the code takes 5 min to run and then it throws an error listed below without producing any results.
Error: node stack overflow
In addition: There were 50 or more warnings (use warnings() to see the first 50)
Error during wrapup: node stack overflow

Thanks.
Nilesh

From: William Dunlap [mailto:[hidden email]]
Sent: Thursday, December 14, 2017 11:26 AM
To: DIGHE, NILESH [AG/2362] <[hidden email]>
Cc: Eric Berger <[hidden email]>; r-help <[hidden email]>
Subject: Re: [R] help with recursive function

Your code contains the lines
        stopifnot(!(any(data1$norm_sd >= 1)))
        if            (!(any(data1$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }

stop() "throws an error", causing the current function and all functions in the call
stack to abort and return nothing.  It does not mean to stop now and return a result.
Does the function give the correct results if you just leave out the stopifnot line?


Bill Dunlap
TIBCO Software
wdunlap tibco.com<http://tibco.com>

On Thu, Dec 14, 2017 at 9:11 AM, DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>> wrote:
Eric:  I will try and see if I can figure out the issue by debugging as you suggested. I don’t know why my code after stopifnot is not getting executed where I like the code to run the funlp2 function when the if statement is TRUE but when it is false, I like it to keep running until the stopifnot condition is met.

When the stopifnot condition is met, I like to get the output from if statement saved.
Anyway,  I will keep trying.
Again, Thanks for your help!
Nilesh

From: Eric Berger [mailto:[hidden email]<mailto:[hidden email]>]
Sent: Thursday, December 14, 2017 10:29 AM
To: DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]>>
Cc: r-help <[hidden email]<mailto:[hidden email]>>
Subject: Re: [R] help with recursive function

If you are trying to understand why the "stopifnot" condition is met you can replace it by something like:

if ( any(dat2$norm_sd >= 1) )
   browser()

This will put you in a debugging session where you can examine your variables, e.g.

> dat$norm_sd

HTH,
Eric



On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> wrote:
The message is coming from your stopifnot() condition being met.


On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> wrote:
Hi, I accidently left out few lines of code from the calclp function.  Updated function is pasted below.
I am still getting the same error “Error: !(any(data1$norm_sd >= 1)) is not TRUE“

I would appreciate any help.
Nilesh
dput(calclp)
function (dataset)
{
    dat1 <- funlp1(dataset)
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",
            names(.)), funs(norm = round(scale(.), 3)))
        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, sd, na.rm = TRUE), 3)
        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, function(x) {
                max(abs(x), na.rm = TRUE)
            }), 3)
        data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,
            -norm_sd) %>% separate(key, c("field_rep", "treatment"),
            "\\.<file://.><file://.%3cfile:/.%3e>") %>% spread(treatment, value) %>% mutate(outlier = NA)
        stopifnot(!(any(data1$norm_sd >= 1)))
        if (!(any(data1$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
       else {
            df2 <- recursive_funlp()
            return(df2)
        }
    }
    df3 <- recursive_funlp(dataset = dat1, func = funlp2)
    df3
}


From: DIGHE, NILESH [AG/2362]
Sent: Thursday, December 14, 2017 9:01 AM
To: 'Eric Berger' <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>>
Cc: r-help <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>>
Subject: RE: [R] help with recursive function

Eric:  Thanks for taking time to look into my problem.  Despite of making the change you suggested, I am still getting the same error.  I am wondering if the logic I am using in the stopifnot and if functions is a problem.
I like the recursive function to stop whenever the norm_sd column has zero values that are above or equal to 1. Below is the calclp function after the changes you suggested.
Thanks. Nilesh

dput(calclp)
function (dataset)
{
    dat1 <- funlp1(dataset)
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",
            names(.)), funs(norm = round(scale(.), 3)))
        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, sd, na.rm = TRUE), 3)
        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
            1, function(x) {
                max(abs(x), na.rm = TRUE)
            }), 3)
        stopifnot(!(any(dat2$norm_sd >= 1)))
        if (!(any(dat2$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
        else {
            df2 <- recursive_funlp()
            return(df2)
        }
    }
    df3 <- recursive_funlp(dataset = dat1, func = funlp2)
    df3
}


From: Eric Berger [mailto:[hidden email]<mailto:[hidden email]>]
Sent: Thursday, December 14, 2017 8:17 AM
To: DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>>
Cc: r-help <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>>
Subject: Re: [R] help with recursive function

My own typo ... whoops ...

!( any(dat2$norm_sd >= 1 ))



On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> wrote:
You seem to have a typo at this expression (and some others like it)

Namely, you write

any(!dat2$norm_sd) >= 1

when you possibly meant to write

!( any(dat2$norm_sd) >= 1 )

i.e. I think your ! seems to be in the wrong place.

HTH,
Eric


On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>>> wrote:
Hi, I need some help with running a recursive function. I like to run funlp2 recursively.
When I try to run recursive function in another function named "calclp" I get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".

I have never built a recursive function before so having trouble executing it in this case.  I would appreciate any help or guidance to resolve this issue. Please see my data and the three functions that I am using below.
Please note that calclp is the function I am running and the other two functions are within this calclp function.

# code:
Test<- calclp(dataset = dat)

# calclp function

calclp<- function (dataset)

{

    dat1 <- funlp1(dataset)

    recursive_funlp <- function(dataset = dat1, func = funlp2) {

        dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%

            mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%

            spread(key = field_rep, value = lp) %>% mutate_at(.vars = grep("_",

            names(.)), funs(norm = round(scale(.), 3)))

        dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, sd, na.rm = TRUE), 3)

        dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

            1, function(x) {

                max(abs(x), na.rm = TRUE)

            }), 3)

        stopifnot(any(!dat2$norm_sd) >= 1)

        if (any(!dat2$norm_sd) >= 1) {

            df1 <- dat1

            return(df1)

        }

        else {

            df2 <- recursive_funlp()

            return(df2)

        }

    }

    df3 <- recursive_funlp(dataset = dat1, func = funlp2)

    df3

}


# funlp1 function

funlp1<- function (dataset)

{

    dat2 <- dataset %>% select(field, set, ent_num, rep_num,

        lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%

        unite(field_rep, field, rep_num) %>% mutate(field_rep = paste(field_rep,

        "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%

        mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),

            3)))

    dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, sd, na.rm = TRUE), 3)

    dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],

        1, function(x) {

            max(abs(x), na.rm = TRUE)

        }), 3)

    data1 <- dat2 %>% gather(key, value, -uniqueid, -norm_max,

        -norm_sd) %>% separate(key, c("field_rep", "treatment"),

        "\\.<file://.><file://.%3cfile:/.%3e>") %>% 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><http://is.na>(x$lp_norm), NA,

            ifelse(abs(x$lp_norm) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# funlp2 function

funlp2<-function (dataset)

{

    data1 <- dataset

    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><http://is.na>(x$lp_norm), NA,

            ifelse(abs(x$lp_norm) == x$norm_max, "yes", "no")),

            x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))

        x

    })

    sdf2 <- bind_rows(sdf)

    all_dat <- bind_rows(df_clean, sdf2)

    all_dat

}


# dataset
dput(dat)
structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
"LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
"OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
"SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
"O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
"B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
"17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
"WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
"NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
"MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
"28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
"EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
"seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
10L, 37L, 6L, 15L, 45L, 49L, 8L, 17L, 50L, 16L, 58L, 72L, 26L,
60L, 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L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names = c("field",
"set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
-787L))

# session info

R version 3.4.1 (2017-06-30)

Platform: i386-w64-mingw32/i386 (32-bit)

Running under: Windows 7 x64 (build 7601) Service Pack 1



Matrix products: default



locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252

[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C

[5] LC_TIME=English_United States.1252



attached base packages:

[1] stats     graphics  grDevices utils     datasets  methods   base



other attached packages:

[1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4



loaded via a namespace (and not attached):

 [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2         tools_3.4.1

 [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5    pkgconfig_2.0.1

[11] rlang_0.1.2      bindr_0.1

This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email]<mailto:[hidden email]><mailto:[hidden email]<mailto:[hidden email]>> mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.






This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.





This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email]<mailto:[hidden email]> mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

This email and any attachments were sent from a Monsanto email account and may contain confidential and/or privileged information. If you are not the intended recipient, please contact the sender and delete this email and any attachments immediately. Any unauthorized use, including disclosing, printing, storing, copying or distributing this email, is prohibited. All emails and attachments sent to or from Monsanto email accounts may be subject to monitoring, reading, and archiving by Monsanto, including its affiliates and subsidiaries, as permitted by applicable law. Thank you.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: help with recursive function

R help mailing list-2
In reply to this post by DIGHE, NILESH [AG/2362]
    recursive_funlp <- function(dataset = dat1, func = funlp2) {
        ...
        if (!(any(data1$norm_sd >= 1))) {
            df1 <- dat1
            return(df1)
        }
       else {
            df2 <- recursive_funlp() # GIVE SOME ARGUMENTS HERE
            return(df2)
        }
    }

When you recurse into recursve_funip(), give it at least a new dataset
argument.
Otherwise it just processes the entire dat1 again and the recursion never
stops.

Bill Dunlap
TIBCO Software
wdunlap tibco.com

On Thu, Dec 14, 2017 at 9:11 AM, DIGHE, NILESH [AG/2362] <
[hidden email]> wrote:

> Eric:  I will try and see if I can figure out the issue by debugging as
> you suggested. I don’t know why my code after stopifnot is not getting
> executed where I like the code to run the funlp2 function when the if
> statement is TRUE but when it is false, I like it to keep running until the
> stopifnot condition is met.
>
> When the stopifnot condition is met, I like to get the output from if
> statement saved.
> Anyway,  I will keep trying.
> Again, Thanks for your help!
> Nilesh
>
> From: Eric Berger [mailto:[hidden email]]
> Sent: Thursday, December 14, 2017 10:29 AM
> To: DIGHE, NILESH [AG/2362] <[hidden email]>
> Cc: r-help <[hidden email]>
> Subject: Re: [R] help with recursive function
>
> If you are trying to understand why the "stopifnot" condition is met you
> can replace it by something like:
>
> if ( any(dat2$norm_sd >= 1) )
>    browser()
>
> This will put you in a debugging session where you can examine your
> variables, e.g.
>
> > dat$norm_sd
>
> HTH,
> Eric
>
>
>
> On Thu, Dec 14, 2017 at 5:33 PM, Eric Berger <[hidden email]
> <mailto:[hidden email]>> wrote:
> The message is coming from your stopifnot() condition being met.
>
>
> On Thu, Dec 14, 2017 at 5:31 PM, DIGHE, NILESH [AG/2362] <
> [hidden email]<mailto:[hidden email]>> wrote:
> Hi, I accidently left out few lines of code from the calclp function.
> Updated function is pasted below.
> I am still getting the same error “Error: !(any(data1$norm_sd >= 1)) is
> not TRUE“
>
> I would appreciate any help.
> Nilesh
> dput(calclp)
> function (dataset)
> {
>     dat1 <- funlp1(dataset)
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>             names(.)), funs(norm = round(scale(.), 3)))
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, sd, na.rm = TRUE), 3)
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, function(x) {
>                 max(abs(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)
>         stopifnot(!(any(data1$norm_sd >= 1)))
>         if (!(any(data1$norm_sd >= 1))) {
>             df1 <- dat1
>             return(df1)
>         }
>        else {
>             df2 <- recursive_funlp()
>             return(df2)
>         }
>     }
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>     df3
> }
>
>
> From: DIGHE, NILESH [AG/2362]
> Sent: Thursday, December 14, 2017 9:01 AM
> To: 'Eric Berger' <[hidden email]<mailto:[hidden email]>>
> Cc: r-help <[hidden email]<mailto:[hidden email]>>
> Subject: RE: [R] help with recursive function
>
> Eric:  Thanks for taking time to look into my problem.  Despite of making
> the change you suggested, I am still getting the same error.  I am
> wondering if the logic I am using in the stopifnot and if functions is a
> problem.
> I like the recursive function to stop whenever the norm_sd column has zero
> values that are above or equal to 1. Below is the calclp function after the
> changes you suggested.
> Thanks. Nilesh
>
> dput(calclp)
> function (dataset)
> {
>     dat1 <- funlp1(dataset)
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>             names(.)), funs(norm = round(scale(.), 3)))
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, sd, na.rm = TRUE), 3)
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>             1, function(x) {
>                 max(abs(x), na.rm = TRUE)
>             }), 3)
>         stopifnot(!(any(dat2$norm_sd >= 1)))
>         if (!(any(dat2$norm_sd >= 1))) {
>             df1 <- dat1
>             return(df1)
>         }
>         else {
>             df2 <- recursive_funlp()
>             return(df2)
>         }
>     }
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>     df3
> }
>
>
> From: Eric Berger [mailto:[hidden email]]
> Sent: Thursday, December 14, 2017 8:17 AM
> To: DIGHE, NILESH [AG/2362] <[hidden email]<mailto:
> [hidden email]>>
> Cc: r-help <[hidden email]<mailto:[hidden email]>>
> Subject: Re: [R] help with recursive function
>
> My own typo ... whoops ...
>
> !( any(dat2$norm_sd >= 1 ))
>
>
>
> On Thu, Dec 14, 2017 at 3:43 PM, Eric Berger <[hidden email]
> <mailto:[hidden email]>> wrote:
> You seem to have a typo at this expression (and some others like it)
>
> Namely, you write
>
> any(!dat2$norm_sd) >= 1
>
> when you possibly meant to write
>
> !( any(dat2$norm_sd) >= 1 )
>
> i.e. I think your ! seems to be in the wrong place.
>
> HTH,
> Eric
>
>
> On Thu, Dec 14, 2017 at 3:26 PM, DIGHE, NILESH [AG/2362] <
> [hidden email]<mailto:[hidden email]>> wrote:
> Hi, I need some help with running a recursive function. I like to run
> funlp2 recursively.
> When I try to run recursive function in another function named "calclp" I
> get this "Error: any(!dat2$norm_sd) >= 1 is not TRUE".
>
> I have never built a recursive function before so having trouble executing
> it in this case.  I would appreciate any help or guidance to resolve this
> issue. Please see my data and the three functions that I am using below.
> Please note that calclp is the function I am running and the other two
> functions are within this calclp function.
>
> # code:
> Test<- calclp(dataset = dat)
>
> # calclp function
>
> calclp<- function (dataset)
>
> {
>
>     dat1 <- funlp1(dataset)
>
>     recursive_funlp <- function(dataset = dat1, func = funlp2) {
>
>         dat2 <- dataset %>% select(uniqueid, field_rep, lp) %>%
>
>             mutate(field_rep = paste(field_rep, "lp", sep = ".")) %>%
>
>             spread(key = field_rep, value = lp) %>% mutate_at(.vars =
> grep("_",
>
>             names(.)), funs(norm = round(scale(.), 3)))
>
>         dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, sd, na.rm = TRUE), 3)
>
>         dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>             1, function(x) {
>
>                 max(abs(x), na.rm = TRUE)
>
>             }), 3)
>
>         stopifnot(any(!dat2$norm_sd) >= 1)
>
>         if (any(!dat2$norm_sd) >= 1) {
>
>             df1 <- dat1
>
>             return(df1)
>
>         }
>
>         else {
>
>             df2 <- recursive_funlp()
>
>             return(df2)
>
>         }
>
>     }
>
>     df3 <- recursive_funlp(dataset = dat1, func = funlp2)
>
>     df3
>
> }
>
>
> # funlp1 function
>
> funlp1<- function (dataset)
>
> {
>
>     dat2 <- dataset %>% select(field, set, ent_num, rep_num,
>
>         lp) %>% unite(uniqueid, set, ent_num, sep = ".") %>%
>
>         unite(field_rep, field, rep_num) %>% mutate(field_rep =
> paste(field_rep,
>
>         "lp", sep = ".")) %>% spread(key = field_rep, value = lp) %>%
>
>         mutate_at(.vars = grep("_", names(.)), funs(norm = round(scale(.),
>
>             3)))
>
>     dat2$norm_sd <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, sd, na.rm = TRUE), 3)
>
>     dat2$norm_max <- round(apply(dat2[, grep("lp_norm", names(dat2))],
>
>         1, function(x) {
>
>             max(abs(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) == x$norm_max, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # funlp2 function
>
> funlp2<-function (dataset)
>
> {
>
>     data1 <- dataset
>
>     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) == x$norm_max, "yes", "no")),
>
>             x$lp <- with(x, ifelse(outlier == "yes", NA, lp)))
>
>         x
>
>     })
>
>     sdf2 <- bind_rows(sdf)
>
>     all_dat <- bind_rows(df_clean, sdf2)
>
>     all_dat
>
> }
>
>
> # dataset
> dput(dat)
> structure(list(field = c("LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01",
> "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "LM01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01",
> "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "OL01", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1",
> "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "SGI1", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS",
> "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "O2LS", "B2NW", "B2NW",
> "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "B2NW", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3",
> "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "17C3", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1",
> "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "WCI1", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "NY01",
> "NY01", "NY01", "NY01", "NY01", "NY01", "NY01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND", "MAND",
> "MAND", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP", "28EP",
> "28EP", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01", "EX01",
> "EX01", "EX01", "EX01", "EX01", "EX01", "EX01"), set = c("seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta", "seta", "seta", "seta", "seta", "seta", "seta",
> "seta", "seta"), ent_num = c(23L, 14L, 43L, 30L, 44L, 60L, 17L,
> 34L, 41L, 40L, 9L, 36L, 38L, 19L, 61L, 51L, 45L, 42L, 3L, 39L,
> 21L, 11L, 12L, 7L, 35L, 5L, 70L, 47L, 28L, 16L, 72L, 13L, 49L,
> 67L, 56L, 32L, 27L, 46L, 24L, 63L, 15L, 66L, 26L, 29L, 48L, 1L,
> 54L, 37L, 2L, 50L, 52L, 31L, 33L, 25L, 6L, 69L, 53L, 10L, 18L,
> 55L, 59L, 4L, 58L, 22L, 20L, 64L, 71L, 57L, 11L, 17L, 43L, 13L,
> 1L, 16L, 34L, 47L, 52L, 72L, 59L, 22L, 54L, 18L, 25L, 61L, 56L,
> 41L, 27L, 14L, 49L, 19L, 29L, 31L, 64L, 6L, 53L, 35L, 37L, 67L,
> 39L, 51L, 40L, 15L, 69L, 60L, 38L, 4L, 23L, 3L, 48L, 32L, 42L,
> 24L, 28L, 33L, 57L, 8L, 21L, 46L, 7L, 30L, 45L, 2L, 63L, 36L,
> 68L, 20L, 66L, 70L, 58L, 5L, 10L, 12L, 62L, 50L, 71L, 9L, 55L,
> 26L, 44L, 65L, 14L, 63L, 46L, 58L, 62L, 19L, 59L, 2L, 5L, 6L,
> 40L, 21L, 44L, 37L, 55L, 35L, 71L, 56L, 10L, 36L, 53L, 25L, 61L,
> 12L, 26L, 23L, 4L, 13L, 28L, 38L, 57L, 54L, 72L, 48L, 66L, 9L,
> 70L, 15L, 39L, 60L, 17L, 34L, 51L, 67L, 42L, 49L, 31L, 30L, 3L,
> 18L, 65L, 32L, 27L, 52L, 22L, 11L, 47L, 64L, 8L, 43L, 41L, 16L,
> 20L, 33L, 7L, 50L, 68L, 24L, 1L, 69L, 45L, 29L, 37L, 30L, 55L,
> 54L, 43L, 32L, 21L, 27L, 33L, 40L, 67L, 57L, 68L, 31L, 17L, 13L,
> 6L, 62L, 19L, 22L, 3L, 10L, 44L, 34L, 69L, 70L, 4L, 1L, 25L,
> 11L, 51L, 5L, 63L, 71L, 12L, 38L, 58L, 39L, 49L, 59L, 56L, 65L,
> 2L, 64L, 8L, 35L, 46L, 45L, 29L, 53L, 36L, 42L, 23L, 18L, 50L,
> 26L, 14L, 48L, 66L, 20L, 24L, 7L, 15L, 53L, 22L, 39L, 20L, 60L,
> 59L, 43L, 19L, 41L, 6L, 62L, 1L, 55L, 34L, 50L, 38L, 40L, 44L,
> 4L, 46L, 29L, 65L, 57L, 48L, 33L, 69L, 14L, 35L, 67L, 72L, 54L,
> 3L, 49L, 2L, 12L, 18L, 30L, 10L, 70L, 31L, 15L, 63L, 71L, 21L,
> 45L, 28L, 56L, 27L, 64L, 61L, 51L, 5L, 24L, 68L, 25L, 66L, 16L,
> 36L, 58L, 37L, 52L, 26L, 9L, 42L, 7L, 11L, 8L, 32L, 23L, 13L,
> 47L, 17L, 61L, 72L, 47L, 60L, 16L, 9L, 28L, 52L, 41L, 1L, 61L,
> 6L, 23L, 58L, 63L, 25L, 28L, 30L, 36L, 62L, 9L, 32L, 19L, 31L,
> 56L, 45L, 2L, 22L, 27L, 40L, 14L, 11L, 50L, 13L, 70L, 20L, 64L,
> 39L, 26L, 21L, 43L, 29L, 35L, 54L, 52L, 37L, 17L, 16L, 72L, 48L,
> 12L, 18L, 44L, 42L, 49L, 68L, 5L, 55L, 69L, 51L, 66L, 59L, 53L,
> 15L, 71L, 41L, 57L, 4L, 60L, 8L, 7L, 33L, 34L, 24L, 10L, 67L,
> 47L, 38L, 3L, 65L, 46L, 20L, 34L, 71L, 1L, 33L, 57L, 13L, 21L,
> 66L, 29L, 3L, 61L, 69L, 24L, 62L, 39L, 49L, 47L, 31L, 53L, 52L,
> 43L, 17L, 7L, 8L, 12L, 60L, 63L, 50L, 2L, 51L, 46L, 10L, 23L,
> 48L, 11L, 26L, 40L, 70L, 42L, 59L, 15L, 56L, 58L, 27L, 6L, 35L,
> 4L, 37L, 5L, 65L, 44L, 28L, 14L, 32L, 36L, 45L, 9L, 18L, 55L,
> 68L, 30L, 54L, 41L, 25L, 22L, 38L, 16L, 67L, 64L, 19L, 72L, 68L,
> 28L, 33L, 15L, 51L, 4L, 47L, 36L, 8L, 57L, 48L, 1L, 52L, 39L,
> 32L, 50L, 13L, 30L, 63L, 2L, 9L, 62L, 22L, 6L, 61L, 16L, 53L,
> 38L, 37L, 20L, 69L, 44L, 56L, 29L, 26L, 14L, 17L, 46L, 66L, 58L,
> 42L, 60L, 19L, 45L, 3L, 59L, 70L, 31L, 24L, 55L, 40L, 43L, 25L,
> 65L, 12L, 67L, 21L, 7L, 27L, 49L, 72L, 54L, 41L, 23L, 34L, 5L,
> 64L, 35L, 18L, 71L, 11L, 24L, 19L, 38L, 14L, 4L, 56L, 5L, 54L,
> 34L, 64L, 55L, 33L, 69L, 71L, 52L, 61L, 48L, 23L, 43L, 41L, 20L,
> 39L, 11L, 63L, 36L, 22L, 9L, 25L, 27L, 51L, 53L, 37L, 57L, 13L,
> 18L, 64L, 22L, 53L, 16L, 5L, 28L, 60L, 31L, 11L, 29L, 45L, 59L,
> 72L, 49L, 67L, 13L, 20L, 3L, 42L, 44L, 69L, 33L, 38L, 15L, 70L,
> 35L, 48L, 26L, 56L, 19L, 39L, 43L, 40L, 14L, 2L, 68L, 51L, 12L,
> 47L, 10L, 55L, 23L, 4L, 71L, 41L, 50L, 7L, 24L, 61L, 27L, 54L,
> 46L, 58L, 37L, 66L, 57L, 1L, 36L, 32L, 18L, 62L, 9L, 30L, 21L,
> 6L, 52L, 8L, 65L, 17L, 25L, 63L, 34L, 65L, 22L, 56L, 9L, 7L,
> 11L, 31L, 4L, 63L, 29L, 61L, 54L, 12L, 62L, 59L, 5L, 23L, 53L,
> 36L, 24L, 35L, 66L, 49L, 72L, 18L, 70L, 32L, 43L, 20L, 45L, 34L,
> 46L, 28L, 6L, 44L, 71L, 39L, 13L, 27L, 1L, 58L, 30L, 68L, 17L,
> 33L, 26L, 57L, 15L, 21L, 52L, 48L, 42L, 16L, 40L, 38L, 8L, 69L,
> 2L, 51L, 67L, 55L, 64L, 47L, 60L, 19L, 41L, 50L, 3L, 14L, 25L,
> 10L, 37L, 6L, 15L, 45L, 49L, 8L, 17L, 50L, 16L, 58L, 72L, 26L,
> 60L, 7L, 32L, 1L, 46L, 66L, 68L, 62L, 47L, 35L, 70L, 10L, 31L,
> 65L, 2L, 3L, 21L, 12L, 30L, 40L, 28L, 59L, 42L, 67L, 44L, 29L
> ), rep_num = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 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, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
> 1L, 1L, 1L, 1L, 1L, 1L, 1L), lp = c(NA, 41.64, 38.8, 44.45, 40.54,
> 38.54, 41.94, 39.6, 37.39, 40.95, 38.45, 43.47, 41.66, 40.91,
> 42.68, 43.12, 38.22, 40.95, 46.24, 42.95, 38.95, 39.88, 40.57,
> 40.13, 38.57, 45.45, 40.78, 43.52, 39.75, 39.93, 40.35, 37.6,
> 37.7, 43.05, 43.32, 41.31, 39.03, 42.5, 43.18, 41.32, 39.58,
> 40.62, 39.64, 39.85, 38.75, 40.18, 41.44, 40.5, 40.87, 40.75,
> 38.37, 40.26, 35.11, 40.89, 41.67, 38.87, 37.32, 35.85, 38.25,
> 42.21, 43.15, 38.69, 38.8, 38.77, 37.98, 39.8, 33.37, 40.09,
> 42.87, 44.07, 43.78, 42.47, 42.8, 41.1, 41.17, 44.07, 44.24,
> 43.16, 46.12, 42.64, 43.92, 42.16, 43.69, 42.89, 42.63, 43.58,
> 44.4, 43.17, 43.3, 42.5, 42.6, 44.05, 44.63, 43.09, 45.17, 45.17,
> 42.78, 42.38, 45.76, 42.16, 44.22, 43.67, 40.45, 41.95, 42.49,
> 41.98, 45.15, 46.01, 38.51, 43.08, 45.19, 44.53, 43.14, 39.93,
> 46.84, 43.59, 41.68, 43.7, 44.63, 44.02, 42.07, 43.88, 43.2,
> 46.2, 40.84, 39.14, 43.89, 42.58, 41.53, 45.32, 39.56, 43.77,
> 45.45, 45.16, 43.4, 40.08, 42.27, 43.74, 43.77, 41.31, 41.38,
> 45.01, 45.76, 40.4, 48.39, 46.27, 15.44, 44.76, 47.45, 44.87,
> 46.8, 41.83, 43.03, 43.96, 42.51, 45.06, 45.55, 44.9, 42.47,
> 44.9, 45, 44.77, 43.79, 44.26, 44.57, 44.4, 43.42, 42.31, 47.18,
> 43.83, 45.72, 44.83, 44.96, 40.28, 42.85, 41.23, 45.23, 47.09,
> 43.61, 42.69, 46.27, 45.16, 44.14, 43.34, 45.97, 43.81, 43.01,
> 39.82, 45.91, 45.97, 43.61, 45.12, 46.37, 42.67, 42.47, 45.86,
> 44.19, 44.46, 42.64, 43.95, 44.93, 40.33, 42.75, 39.92, 44.17,
> 44.49, 41.51, 42.43, 44.14, 40.5, 41.29, 44.89, 37.98, 39.02,
> 39.62, 42.13, 39.03, 44.16, 39.15, 41.49, 42.63, 40.11, 39.97,
> 42.85, 35.98, 39.45, 40.99, 42.44, 42.11, 37.36, 40.63, 40.69,
> 43.57, 39.04, 39.3, 42.19, 36.88, 40.39, 37.78, 38.6, 40.2, 40.98,
> 36.58, 43.59, 42.49, 39.96, 39.84, 40.43, 38.94, 42.72, 39.43,
> 42.13, 40.36, 40.58, 40.01, 42.17, 42.17, 41.35, 43.27, 40.15,
> 39.76, 40.94, 40.87, 42.32, 41.81, 41.97, 43.72, 41.32, 40.83,
> 37.64, 41.03, 38.98, 40.61, 41.17, 41.96, 40.07, 38.48, 42.85,
> 38.68, 39.09, 42.16, 38.14, 37.99, 41.06, 37.4, 41.88, 39.35,
> 39.73, 38.38, 41.34, 40.67, 40.89, 39.28, 37.59, 39.3, 39.72,
> 40.79, 39.42, 34.5, 37.61, 37.76, 40.24, 41.17, 41.24, 42.14,
> 42.53, 39.71, 39.44, 40.19, 42.51, 40.15, 36.26, 37.48, 40.43,
> 37.5, 42.11, 41.44, 40.29, 39.75, 37.58, 41.25, 40.39, 41.63,
> 42.18, 43.71, 38.69, 43.47, 41.98, 35.51, 42.22, 38.51, 40.17,
> 39.4, 39.54, 41.7, 40.93, 40.01, 35.97, 41.44, 41.89, 40.9, 39.95,
> 40.69, 43.18, 37.03, 39.91, 36.75, 42.75, 41.61, 42.6, 38.55,
> 42.84, 38.41, 42.55, 41.44, 41.03, 40, 41.35, 42.18, 42.66, 40.06,
> 42.48, 41.33, 41.92, 40.88, 40.99, 42.78, 38.26, 40.81, 39.95,
> 37.89, 40.81, 38.33, 39.33, 39.67, 40.12, 41.75, 39.81, 41.92,
> 44.59, 37.8, 40.54, 40.49, 41.82, 42.13, 39.93, 39.94, 42.54,
> 41.74, 43.06, 41.72, 41.27, 39.42, 42.07, 40.06, 42.1, 38.91,
> 39.28, 42.94, 39.94, 41.86, 38.56, 38.15, 41.47, 42.34, 38.14,
> 40.19, 40.2, 43.01, 42.35, 40.89, 41.44, 42.89, 44.49, 39.1,
> 38.42, 37.44, 43.28, 37.96, 40.56, 41.53, 41.59, 41.45, 42.55,
> 40.6, 44.04, 39.31, 41.08, 37.14, 40.03, 41.49, 40.82, 38.47,
> 43.43, 38.82, 40.4, 41.09, 42.26, 41.85, 41.13, 37.27, 41.97,
> 45.24, 43.35, 40.53, 43.14, 39.71, 42.77, 42.2, 42.13, 41.91,
> 42.59, 41.99, 42.11, 40.43, 40.02, 43.53, 43.01, 39.55, 43.2,
> 39.95, 42.51, 42, 42.26, 42.39, 42.64, 39.9, 41.89, 43.05, 41.02,
> 41.95, 39.92, 43.42, 44.01, 42.6, 40.84, 42.86, 44.31, 42.24,
> 41.25, 42.38, 44.99, 41.24, 43.97, 41.12, 37.88, 41.53, 41.56,
> 39.18, 40.83, 42.96, 41.92, 43.86, 42.48, 42.65, 43.3, 41.99,
> 42.51, 40.65, 42.77, 34.71, 40.97, 38.15, 39.76, 36.74, 37.95,
> 39.17, 38.22, 39.31, 43.57, 37.21, 39.35, 42.37, 42.01, 42.39,
> 43.21, 36.91, 36.69, 41.07, 41.91, 34.63, 40.61, 36.23, 38.12,
> 40.76, 39.14, 41.81, 39.14, 41.04, 37.32, 40.83, 40.81, 38.29,
> 39.61, 40.96, 40.71, 40.47, 38.64, 39.76, 38.19, 39.05, 38.04,
> 41.14, 38.35, 42.3, 34.44, 40.93, 39.3, 41.44, 38.3, 42.74, 36.66,
> 40.02, 36.62, 40.48, 41.72, 41.23, 41.81, 42.07, 40.22, 37.83,
> 36.54, 37.77, 40.49, 38.65, 43.2, 43.32, 40.67, 41.95, 36.11,
> 39.28, 42.38, 40.35, 40.3, 43.48, 40.55, 40.54, 44.03, 41.94,
> 37.97, 41.98, 41.53, 38.19, 38.66, 41.18, 41.95, 42.53, 38.7,
> 44.55, 42.39, 41.55, 38.46, 42.27, 42.19, 41.95, 41.81, 39.81,
> 38.12, 42.94, 42.99, 38.85, 41.26, 43.13, 44.21, 38.54, 44.02,
> 43.46, 41.64, 42.06, 42.11, 42.34, 41.86, 37.91, 40.89, 40.5,
> 39.54, 37.87, 40.86, 41.36, 41.77, 42.03, 39.15, 40.04, 44.11,
> 41.34, 42.97, 38.42, 37.28, 41.04, 41.48, 38.82, 41.94, 37.95,
> 40.9, 40.39, 40.31, 43.19, 41.22, 41.49, 41.25, 40.07, 36.7,
> 39.97, 39.99, 41.7, 37.09, 42.58, 43.01, 37.7, 41.81, 39.99,
> 42.95, 43.19, 42.69, 41.5, 40.64, 43.24, 41.14, 41.21, 41.29,
> 41.43, 44.21, 38.52, 42.54, 40.54, 42.49, 43.2, 38.12, 40.08,
> 39.02, 41.45, 42.33, 41.11, 38.93, 41.63, 44.22, 41.41, 39.08,
> 40.9, 41.1, 43.88, 40.96, 46.75, 47.54, 40.35, 41.97, 44.94,
> 44.91, 44.66, 44.5, 44.4, 46.4, 47.97, 46.05, 45.57, 42.83, 41.48,
> 47.48, 45.43, 41.98, 43.14, 45.6, 44.78, 45.45, 45.69, 44.82,
> 44.24, 41.14, 43.14, 46.61, 43.92, 43.56, 43.68, 45.37, 45.15,
> 40.76, 43.78, 44.67, 41.36, 41.4, 40.97, 41.87, 39.83, 43.8,
> 48.36, 44.28, 43.29, 44.69, 43.26, 43.35, 44.34, 45.08, 42.26,
> 39.7, 42.4, 44.03, 43.22, 42.71, 45.89, 44.89, 44.81, 42.59,
> 40.85, 43.82, 44.85, 47.47, 43.64, 42.65, 45.67, 43.24, 42.33,
> 40.61, 38.3, 39.84, 41.08, 42.33, 44.44, 40.85, 39.58, 42.55,
> 41.75, 39.44, 41.79, 39.31, 41.34, 42.76, 40.79, 37.31, 42.85,
> 42.88, 42.01, 44.63, 38.85, 41.13, 40.43, 41.34, 43.14, 40.58,
> 42.21, 38.94, 44.88, 42.33, 42.61, 41.88, 41.13, 41.83, 42.8)), .Names =
> c("field",
> "set", "ent_num", "rep_num", "lp"), class = "data.frame", row.names = c(NA,
> -787L))
>
> # session info
>
> R version 3.4.1 (2017-06-30)
>
> Platform: i386-w64-mingw32/i386 (32-bit)
>
> Running under: Windows 7 x64 (build 7601) Service Pack 1
>
>
>
> Matrix products: default
>
>
>
> locale:
>
> [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United
> States.1252
>
> [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
>
> [5] LC_TIME=English_United States.1252
>
>
>
> attached base packages:
>
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
>
>
> other attached packages:
>
> [1] bindrcpp_0.2 tidyr_0.6.3  dplyr_0.7.4
>
>
>
> loaded via a namespace (and not attached):
>
>  [1] compiler_3.4.1   magrittr_1.5     assertthat_0.2.0 R6_2.2.2
>  tools_3.4.1
>
>  [6] glue_1.1.1       tibble_1.3.3     Rcpp_0.12.11     stringi_1.1.5
> pkgconfig_2.0.1
>
> [11] rlang_0.1.2      bindr_0.1
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email]<mailto:[hidden email]> mailing list -- To
> UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
>
>
>
>
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>
>
>
>
> This email and any attachments were sent from a Monsanto email account and
> may contain confidential and/or privileged information. If you are not the
> intended recipient, please contact the sender and delete this email and any
> attachments immediately. Any unauthorized use, including disclosing,
> printing, storing, copying or distributing this email, is prohibited. All
> emails and attachments sent to or from Monsanto email accounts may be
> subject to monitoring, reading, and archiving by Monsanto, including its
> affiliates and subsidiaries, as permitted by applicable law. Thank you.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/
> posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.