Displaying 2 results from an estimated 2 matches for "anothermodel".
2004 Jun 16
1
Compiling C++ package source: linking problem?
...s fine:
#include <R.h>
#include <Rdefines.h>
...
SEXP whatever (SEXP model)
{
Rprintf ("Hello, here I am!\n");
return model;
}
However, the following doesn't compile at all:
#include <R.h>
#include <Rdefines.h>
...
SEXP whatever (SEXP model)
{
SEXP anotherModel;
PROTECT(anotherModel = NEW_NUMERIC(4));
UNPROTECT(1);
return anotherModel;
}
An example of compiler feedback from R CMD SHLIB (I have mingw 3.1.0):
...: undefined reference to 'Rf_allocVector(unsigned,int)'
...: undefined reference to 'Rf_protect(SEXPREC*)'
...: undefine...
2006 Jun 01
9
access model from controller
Hello,
Rather new to RoR, so I''m not sure about the terminology and such :-/ .
My question is: how could I know the model which is associated to a
controller?
For example:
- controller class is TestController, which is a subclass of
ApplicationController
- associated model class is Test
How could I write some code in a method of ApplicationController to
dermine the current