Difference between revisions of "OpasnetUtils/Drafts"

From Testiwiki
Jump to: navigation, search
(Calculations: semi-working showind saved)
(Calculations)
Line 39: Line 39:
 
   deptable <- data.frame()
 
   deptable <- data.frame()
 
   for(i in ls(name = name)) {
 
   for(i in ls(name = name)) {
    #   d <- g#et(i)
+
    #   d = list(g#et(i))[[1]]
 
     if(class(get(i)) == "ovariable") {
 
     if(class(get(i)) == "ovariable") {
 
       depind <- list()
 
       depind <- list()
Line 47: Line 47:
 
           if(!exists(k)) cat(k, "does not exist.\n") else {
 
           if(!exists(k)) cat(k, "does not exist.\n") else {
 
             if(class(get(k)) != "ovariable") cat(k, "is not an ovariable.\n") else {
 
             if(class(get(k)) != "ovariable") cat(k, "is not an ovariable.\n") else {
               #             ko <- g#et(k)
+
               # ko <- g#et(k)@output
 
               # We don't want to look at all Iters, but forbidden <-get() makes this tricky., so we just disable
 
               # We don't want to look at all Iters, but forbidden <-get() makes this tricky., so we just disable
 
               # this functionality at the moment. koIter should be replaced by ko$Iter where ko <- g#et(k)
 
               # this functionality at the moment. koIter should be replaced by ko$Iter where ko <- g#et(k)
               if("Iter" %in% colnames(get(k)@output)) koIter <- as.factor(max(as.numeric(as.character(get(k)$Iter))))
+
               #if("Iter" %in% colnames(ko)) ko$Iter <- as.factor(max(as.numeric(as.character(ko$Iter))))
 
               cols <- colnames(get(k)@output)
 
               cols <- colnames(get(k)@output)
 
               if(!sources) cols <- cols[!grepl("Source$", cols)]
 
               if(!sources) cols <- cols[!grepl("Source$", cols)]
Line 94: Line 94:
 
         data.frame(
 
         data.frame(
 
           Ovariable = i,
 
           Ovariable = i,
           Size = nrow(d@output),
+
           Size = nrow(get(i)@output),
 
           Dependencies = dep,
 
           Dependencies = dep,
 
           Current = paste(curcols, collapse = ", "),
 
           Current = paste(curcols, collapse = ", "),

Revision as of 18:02, 6 June 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") # Old version that fetches all objects, depreciated and not updated.
objects.latest("Op_en6007", code_name = "diagnostics") # Functions for ovariable and model diagnostics: ovashapetest, showLoctable, binoptest
objects.latest("Op_en6007", code_name = "webropol") # Functions for operating with Webropol data
objects.latest("Op_en6007", code_name = "miscellaneous") # Functions for various tasks
objects.latest("Op_en6007", code_name = "gis") # Functions for ovariable, KML and Googl maps interactions

Rationale

Calculations

Functions for ovariable diagnostics showind has problems with get() but this version of code was acceptable [1].

+ Show code

Functions for Webropol data

+ Show code

Miscellaneous functions

+ Show code

Functions for GIS data

+ Show code

See also

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>