RetoSchmucki / rbms

A home for the latest rbms R package
https://retoschmucki.github.io/rbms/
Other
4 stars 5 forks source link

Error in one line of the script #4

Closed dirkmaes33 closed 4 years ago

dirkmaes33 commented 5 years ago

Dear Reto

I downloaded the rbms package and it worked fine untill I tried to run this part of the code

============== co_index <- list()

for progression bar, uncomment the following

pb <- txtProgressBar(min = 0, max = dim(bootsample$boot_ind)[1], initial = 0, char = "*", style = 3)

for(i in c(0,seq_len(dim(bootsample$boot_ind)[1]))){

co_index[[i+1]] <- rbmsD::collated_index(data = sindex, s_sp = 2, sindex_value = "SINDEX", bootID=i, boot_ind= bootsample, glm_weights=TRUE, rm_zero=TRUE)

for progression bar, uncomment the following

setTxtProgressBar(pb, i)

}

collate and append all the result in a data.table format

co_index <- rbindlist(lapply(co_index, FUN = "[[","col_index"))

resulting in an error message. I removed the D from 'rbmsD' in this part of the code "co_index[[i+1]] <- rbmsD::collated_index(data = sindex, s_sp = 2, sindex_value = "SINDEX", bootID=i, boot_ind= bootsample, glm_weights=TRUE, rm_zero=TRUE)" and it worked well ... so I think/hope this is the correct solution for it?

Many thanks for making this analysis possible!

Best regards Dirk

RetoSchmucki commented 4 years ago

Well spotted, this is indeed a vestige from the development version 'rbmsD'. Thank you for reporting - sorted!