Difference between revisions of "OpasnetUtils/Drafts"

From Testiwiki
Jump to: navigation, search
(Answer: safer implementation of truncateIndex)
(Answer)
Line 370: Line 370:
 
obj, # ovariable to use.
 
obj, # ovariable to use.
 
cols, # names of the columns to truncate.
 
cols, # names of the columns to truncate.
bins = 10, # Number of bins to show. Other bins will be merged to "Other".
+
bins = 10, # Number of bins to show. Other locations will be lumped to bin "Other".
 
sum_others = TRUE # Should "Other" be summed to maintain marginal status
 
sum_others = TRUE # Should "Other" be summed to maintain marginal status
 
) {
 
) {
 
#obj@output <- obj@output[!is.na(result(obj)),]
 
#obj@output <- obj@output[!is.na(result(obj)),]
test <- oapply(obj, cols, sum, na.rm = TRUE)
+
test <- oapply(abs(obj), cols, sum, na.rm = TRUE)
 
for(i in 1:length(cols))
 
for(i in 1:length(cols))
 
{
 
{

Revision as of 06:13, 9 July 2015



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>