Displaying 2 results from an estimated 2 matches for "importr".
Did you mean:
import
2010 Jan 14
1
how to call a function from C
Hi,
In Rcpp, we now have a "Function" class to encapsulate functions (they
cover all three kinds, but this may change).
To call the function, what we do is generate a call with the function as
the first node and then evaluate the call.
SEXP stats = PROTECT( R_FindNamespace( mkString( "stats") ) );
SEXP rnorm = PROTECT( findVarInFrame( stats, install( "rnorm") ) )
2011 Oct 17
0
rpy2 pie chart
I am trying to create a pie chart using rpy2 of the following data
Pathway Occurrences
A 10%
B 50%
C 20%
E 10%
filename = './testing.png'
grdevices = importr('grDevices')
rdevices.png(file=filename, width=1200, height=800)
dataf = Robjects.DataFrame({'pathways':Robjects.StrVector(Pathways),
occurrences' :
Robjects.FloatVector(Occurrences)
})
pie = ggplot2.ggplot(...