Difference between revisions of "Opasnet (R library)"

From Testiwiki
Jump to: navigation, search
(Answer: updated functions and a couple of new ones)
m (Answer)
Line 22: Line 22:
 
library(OpasnetBaseUtils)
 
library(OpasnetBaseUtils)
 
library(xtable)
 
library(xtable)
 +
library(triangle)
  
 
NIterations  <- 5
 
NIterations  <- 5

Revision as of 12:58, 20 June 2012


--# : The page should be renamed. OpasnetUtils is the current name of the R package containing these and the old OpasnetBaseUtils functions. --Teemu R 11:23, 14 June 2012 (EEST)


This is a library of functions for R statistical software, designed for the key tasks of modelling in Opasnet.

Question

What functions should be used in Opasnet modelling?

Answer

+ Show code

# : There is a bug somewhere that changes the case of initial letters in locations (values of indices). For example these unwanted conversions have been seen: Result -> result, Type -> type, g -> G, m -> M, p -> P. This happens when the data is uploaded to Opasnet Base, because the wrong case is seen both with op_baseGetData and Opasnet Base interface. Example data with problems: Unit conversions. --Jouni 11:44, 3 June 2012 (EEST)

# : This is a problem of the MySQL database. When determining loc.id:s, the op_baseWrite function queries the database for existing locations of the same name (after first issuing an error-ignoring query for entering all the indices and locations in the data). Since SQL is not caste sensitive for the first letter (thats what I believe caused some issues earlier) it will consider "Result" and "result" equal and will not allow both to be entered into the database as separate unique values. Hence when uploaded data contains a location or index "Result" and the database already contains an entry "result", "Result" cannot be entered. But R is case sensitive and will not recognize the returned value of "result" as the same as "Result" in the data. So to circumvent this issue all entries that are returned for matching are converted to lower case. So to fix this issue you would have to correct the old entry for the location "result" to "Result" in the database or make sure to be very careful that new indices and locations (when created) are in the proper case as all following uploads will use the same format. --Teemu R 14:00, 3 June 2012 (EEST)
TODO: {{#todo:Poistuuko tämä ongelma Opasnet Base 2:ssa?|Juha Villman, Einari Happonen|}}


TODO: {{#todo:Toinen asia OB2:een liittyen: Indekseille pitäisi pystyä antamaan yksiköt, koska ne eivät ole itsestäänselviä (Erkki huomasi tämän). Onko tämän toteutus suunniteltu? Seka kannassa pitää olla paikka, ja lisäksi esim. t2b:ssa olisi syytä olla parametri yksiköiden antamista varten (tai pitäisikö nykyistä unit-parametrin käyttöä laajentaa?).|Juha Villman, Einari Happonen|}}


Rationale

These functions were previously on pages

See also

References


Related files

<mfanonymousfilelist></mfanonymousfilelist>