search for: robjects

Displaying 20 results from an estimated 39 matches for "robjects".

Did you mean: objects
2009 Nov 19
3
Issue when calling deparse(substitute(x)) from C with "anonymous" R vectors ?
...te this, I am using rpy2 (as the problem was found when using it http://sourceforge.net/mailarchive/forum.php?thread_name=4B043CA1.9050500%40salilab.org&forum_name=rpy-list ), but it will likely be present in other bridges to R as well. #using R-2.10 and rpy2-2.1.dev >>> import rpy2.robjects as robjects >>> f = robjects.r('''function(x) return(deparse(substitute(x)))''') >>> tuple(f(robjects.FloatVector(range(17)))) ('c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)',) # length 1 >>> tuple(f(robjects.FloatVector...
2010 May 19
1
Why does my RPy2 program run faster on Windows?
...([%s],[%s]) )PivotTable ) a order by dlyprice_date" %(cds,bm,cds,bm)): d1.append(str(row[0])) v1.append(row[1]) v2.append(row[2]) t4=datetime.now() t1=datetime.now() print "Calculating" d1.pop(0) d1vec = robjects.StrVector(d1) v1vec = robjects.FloatVector(v1) v2vec = robjects.FloatVector(v2) r1 = r('Return.calculate(%s)' %v1vec.r_repr()) r2 = r('Return.calculate(%s)' %v2vec.r_repr()) tl = robjects.rlc.TaggedList([r1,r2],tags=('Geo','Nifty...
2012 May 03
1
Setting up a windows system for rcpp
I am running into a wall getting my system to work with rcpp and inline. Following Dirk's advice on stackoverflow, I hope someone is able to help me. My steps were to install MinGW 32 bit first, then installing Rtools, I disabled MinGW's entry in the PATH. I am trying to get the following code to work: library(Rcpp) library(inline) body <- ' NumericVector xx(x); return wrap(
2012 Nov 25
0
Problema de compilacion con Rcpp
Hola, necesito compilar un programa de tipo source (Rstan) con c++ La propia web del programa indica como hacerlo con Rcpp. Sin embargo no consigo que funcione Rcpp ni con un ejemplo básico. He seguido las instrucciones que vienen en http://tonybreyal.wordpress.com/2011/12/07/installing-rcpp-on-windows-7-for-r-and-c-integration/ Tengo instalado Rtools y los paths correspondientes, pero no
2009 Nov 11
1
fisher.test negative value error
Hi all, I am new to python, R and rpy2. I having few errors when I am using 'fisher.test' function where I am struck now. Please help to fix these bugs. My code for fisher.test goes this way *from rpy2 import * import rpy2.robjects as robjects def fisherExact(a,b,c,d): v = [a,b,c,d] m = robjects.r['matrix'](v,2,2) s = robjects.r['fisher.test'](m) return s * Here the value of a=0,b=1,c=0 and d=1. so the matrix m should be like this [,1] [,2] [1,] 0 0 [2,] 1 1 But I am getting an error...
2013 May 01
1
rpy2 postgres qgis problem
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130501/294047df/attachment.pl>
2010 Oct 20
0
[Rpy] "lapack routines cannot be loaded" in Ubuntu Linux 9.10
...not). | > | > Are you linkingR against a system-wide LAPACK ? | > | > | > | > E............................................................................................. | > ====================================================================== | > ERROR: testEigen (rpy2.robjects.tests.testArray.MatrixTestCase) | > ---------------------------------------------------------------------- | > Traceback (most recent call last): | > File | > "/usr/local/lib/python2.6/dist-packages/rpy2-2.1.7_20101019-py2.6-linux-i686.egg/rpy2/robjects/tests/testArray.py",...
2013 Aug 28
1
Error when using buildVignettes()
Dear all, When running function 'testQAReport()', which uses function 'buildVignettes()' to create a pdf-file I get the following error: > source("testQAReport.R") > testQAReport() Error in .get_package_metadata(pkgdir) : Files 'DESCRIPTION' and 'DESCRIPTION.in' are missing. Since I did not get this error in earlier versions of R, could you
2011 May 05
1
problem with location of libraries 64-bit (opensuse)
...tched is used. The following problem occurs (user report): ----------------------- > Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>> import rpy2.robjects as robjects > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/local/lib64/python2.7/site-packages/rpy2/robjects/__init__.py", > line 12, in <module> import rpy2.rinterface as rinterface > File > "/u...
2000 Nov 02
2
RSPerl...
Duncan - (but sent to R-devel, for any other thoughts?) How do you envision RSPerl being used? Without having seen the details, I can think of playing with strings; is there a preferred incantation for stringification of R objects (serialization)? (actually, the main problem I'm having is that I know how I want to code something like: Robject <-
2010 Jun 14
1
executable script
In Python, it is literally this easy: import rpy2.robjects as robjects robjects.r(""" source("C:/ YOUR R FILE GOES HERE ") """) Type the name of your R source code into this script and save it as a Python script (add the suffix .py), and then you can run by double-clicking. If you want to see the r...
2011 Oct 17
0
rpy2 pie chart
...o 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(dataf)+ \ ggplot2.aes_string(x='',fill='pathways',weight="amounts&quo...
2015 May 03
2
C-API: check whether R has been initialized ?
...ce might sometimes be superior to necessity, the suggested pattern ("every program, including R itself, keeping its own flag") does no work too well when the nested embedding of R is involved. A concrete example is: ``` $ R -q > library('rPython'); python.exec('import rpy2.robjects') R is already initialized ``` https://bitbucket.org/rpy2/rpy2/issue/278/r-in-python-via-rpy2-in-r-via-rpython#comment-17843761 2015-05-03 18:12 GMT-04:00 Duncan Murdoch <murdoch.duncan at gmail.com>: > On 03/05/2015 4:34 PM, Laurent Gautier wrote: > > Hi, > > > >...
2010 Jan 21
1
use R from python
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100121/95fb8869/attachment.pl>
2013 Oct 31
1
an rpy2, R cgi type question
...t; /> Graph Function <input type="text" name="func1" <br /> <input type="submit" value="Select Subject" /> </form> Now the radio4.py file: # Import modules for CGI handling import cgi, cgitb from sympy import * import sys from rpy2.robjects.packages import SignatureTranslatedAnonymousPackage as STAP with open("bz2.R","r") as f: string=''.join(f.readlines()) etest = STAP(string,"etest") etest.etest(500) # Create instance of FieldStorage form = cgi.FieldStorage() # Get data from fields if for...
2009 Apr 06
1
Possible bug: How does libR.so find RHOME?
...OME path to my R-2.9 library build explicitly to RPy2's setup.py by means of an environment variable that is checked by the script. This resulted in an RPy2 installation properly linked to my R-2.9. However, on starting RPy2 in Python, I got this strange error: >>> from rpy2 import robjects Error in grep("(_US|_CA)", lcpaper) : 8 arguments passed to .Internal(grep) which requires 9 [...] RPy2 started up nevertheless, but failed to load the base packages, so that all standard functions were missing. Changing the "R" symlink in my search path to point to th...
2015 May 04
2
C-API: check whether R has been initialized ?
...pattern ("every program, including R itself, keeping its own flag") does > > no work too well when the nested embedding of R is involved. > > > > A concrete example is: > > ``` > > $ R -q > >> library('rPython'); python.exec('import rpy2.robjects') > > R is already initialized > > ``` > > I don't know rPython at all, but surely this is an rPython bug. When > the package is loaded by "library('rPython')", R is obviously > initialized. You don't need to query it to ask that. > > Th...
2011 Apr 14
1
Rcpp segmentation faults on the simplest code
Hi all, I'm new to R and Rcpp, and I'm trying to learn Rcpp with the simplest code possible. My goal is to be able to call R functions from C++. The code I'm trying to run is: #include #include #include #include int main(int argc, char* argv[]) { Rcpp::NumericVector v(1); return 0; } It compiles and links fine. However, as soon as I run it, it segfaults. The following is
2010 Jan 02
3
R-devel Digest, Vol 83, Issue 2
[Disclaimer: what is below reflects my understanding from reading the R source, others will correct where deemed necessary] On 1/2/10 12:00 PM, r-devel-request at r-project.org wrote: > > Hello, > > We are currently making lots of changes to Rcpp (see the open Rcpp > mailing list if interested [1] in the details). > > We are now using [2] R_PreserveObject and R_ReleaseObject
2012 Jun 08
4
Multiple sub-architecture: linking issue
Hi again, following my previous post on RCurl, I cannot install Rcpp either: g++ -m32 -I/home/renaud/bin/R/2.15/lib64/R/include -I/home/renaud/bin/R/2.15/lib64/R/include/i386 -DNDEBUG -I../inst/include/ -I/usr/local/include -fpic -g -O2 -c r_cast.cpp -o r_cast.o g++ -m32 -shared -L/usr/local/lib64 -o Rcpp.so Date.o DateVector.o Datetime.o DatetimeVector.o Dimension.o DottedPair.o