Difference between revisions of "OpasnetUtils/Drafts"

From Testiwiki
Jump to: navigation, search
(Answer: webropol.convert and merge.questions were moved from Goherr: Fish consumption study)
(Answer: showLoctable added)
Line 20: Line 20:
  
 
############## Generic functions and objects are defined first.
 
############## Generic functions and objects are defined first.
 +
 +
#### showLoctable lists locations of each index in the evaluated ovariables in the global environment.
 +
 +
showLoctable <- function(name = ".GlobalEnv") {
 +
  loctable <- data.frame()
 +
 
 +
  for(i in ls(name = name)) {
 +
    if(class(get(i)) == "ovariable") {
 +
      for(j in colnames(get(i)@output)) {
 +
        if(!(grepl("Source", j) | grepl("Result", j))) {
 +
          loctable <- rbind(
 +
            loctable,
 +
            data.frame(
 +
              Ovariable = i,
 +
              Index = j,
 +
              Class = class(get(i)@output[[j]]),
 +
              NumLoc = length(unique(get(i)@output[[j]])),
 +
              Locations = paste(head(unique(get(i)@output[[j]])), collapse = " ")
 +
            )
 +
          )
 +
        }
 +
      }
 +
    }
 +
  }
 +
  return(loctable)
 +
}
  
 
### webropol.convert converts a csv file from Webropol into a useful data.frame.
 
### webropol.convert converts a csv file from Webropol into a useful data.frame.

Revision as of 11:31, 19 May 2017



Question

Which functions are so useful that they should be taken into OpasnetUtils package? This page contains draft function which will be included when they are good enough and found important.

Answer

Call the objects stored by this code from another rode with this command:

objects.latest("Op_en6007", code_name = "answer")

+ Show code

See also

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>