search for: testobject

Displaying 9 results from an estimated 9 matches for "testobject".

2011 Jun 29
2
Testing if a variable is specified within a function & adding TRUE/FALSE options to functions
...s for d1 and d2 are entered then the function defaults to plotting the whole time series, else it plots the data for the interval specified by d1 and d2. I am attempting to test if the variable d1 has been inputted by using a different function, orginally posted on a R help forum by Brian Ripley. testObject <- function(object) { exists(as.character(substitute(object))) } here testObject(x) returns FALSE if x is not currently present a variable in the work space image. testObject works fine outside my plotting function, but not within it.... it always returns FALSE inside the plotting function...
2006 Apr 10
2
TukeyHSDs function (pgirmess package)
...owever, it seems that this function isn't working as intended when only the two last populations means being tested are significant. An example of this can be seen below: >numbers<-c(464,482,453,434,495,487) >group<-gl(3,2,label=c("A","B","C")) >testobject<-aov(numbers~group) >result<-TukeyHSD(testobject,conf.level=0.95) >error<-TukeyHSDs(result) >error$group[,1] Error in error$group[, 1] : incorrect number of dimensions To illustrate the "normal" function, the data set below can be used. >numbers<-c(845,829,682,...
2006 May 06
0
Cant read an Array as an attribute of a record
...t saving the object to the database, I''ve got a requirement to create and manipulate it in memory before persisting it. Thanks in advance to anyone who may help! Test/app/db/migrate/001_create_test_objects.rb ------------------------------------------------------------------ class CreateTestObjects < ActiveRecord::Migration def self.up create_table :test_objects do |t| t.column :name, :string t.column :test_array, :string end end def self.down drop_table :test_objects end end Test/app/models/test_object.rb -------------------------------------------------...
2007 Apr 04
4
[LLVMdev] For a small help
...s TestClass { int testMethod(int a); } and I want to create a call instruction that calls obj.testMethod(input) where obj is an instance of TestClass TestClass obj; // I have this declared prior int input = 1; // I have declared prior int output; // I have this declared prior too output = obj.testObject(input); // I want to create this instruction Thanks, Ferad -- Ferad Zyulkyarov Barcelona Supercomputing Center
2007 Mar 03
11
Beyond multiple return values
First off, I love mocha and have been using it all over the place ever since I found it a few months ago. So I noticed the other day rather belatedly that mocha-0.4.0 had been released and that we can now do the object.stubs(:method).returns (:first_value, :second_value). Much neater than fiddling with lambdas everytime this sort of behaviour is needed But can we go further ? I was
2007 Apr 04
0
[LLVMdev] For a small help
...} > > and I want to create a call instruction that calls > obj.testMethod(input) where obj is an instance of TestClass > > TestClass obj; // I have this declared prior > int input = 1; // I have declared prior > int output; // I have this declared prior too > output = obj.testObject(input); // I want to create this instruction > Why not just code this up into a C++ function and submit it to the online demo to see what is produced? I submitted this: class TestClass { public: int testMethod(int a); virtual int testMethod2(int a); }; int doit() { TestClass obj; // I...
2002 Jan 27
1
Testing if an object exists
Is it possible to test if an object exists without using the object name? For example I have a function with scanid as a variable. I want to test for the attributes of that object, but if the object has not already been defined I will get an error 'Object "SC000027" not found' where SC000027 is the scanid. So can I check if the object exists or not before attempting any
2007 Apr 04
0
[LLVMdev] For a small help
...t; } > > and I want to create a call instruction that calls > obj.testMethod(input) where obj is an instance of TestClass > > TestClass obj; // I have this declared prior > int input = 1; // I have declared prior > int output; // I have this declared prior too > output = obj.testObject(input); // I want to create this instruction > > Thanks, > Ferad > You can use the LLVM demo page ( http://llvm.org/demo/index.cgi ) to find out what LLVM code is generated for some C++ code. For example, the above produces: ; ModuleID = '/tmp/webcompile/_6207_0.bc' targ...
2011 Jun 30
0
help with interpreting what nnet() output gives:
...s for d1 and d2 are entered then the function defaults to plotting the whole time series, else it plots the data for the interval specified by d1 and d2. I am attempting to test if the variable d1 has been inputted by using a different function, orginally posted on a R help forum by Brian Ripley. testObject <- function(object) { exists(as.character(substitute(object))) } here testObject(x) returns FALSE if x is not currently present a variable in the work space image. testObject works fine outside my plotting function, but not within it.... it always returns FALSE inside the plotting function...