similar to: simple example of C interface to R

Displaying 20 results from an estimated 2000 matches similar to: "simple example of C interface to R"

2003 Dec 31
2
how to use apply on a two variable t-test
does anyone know how to use the apply function on a two-variable t-test? i've tried everything. apply(data[1:4],1,t.test) # works, but only a one-variable test apply((data[1:4],data[5:9]),1,t.test) # returns a syntax error i've also tried using the for loop: for (i in 1:1000) t.test(data[i,1:4],data[i,5:9]) doesn't print anything! it processes for awhile, so i know it's doing
2010 Nov 22
4
How to call R from C
Hi all! I read R Extensions manual. But still I am not sure how to call R functions from C. Would any of you give me a sample C code to show how to call R functions - for instance, time series functions - from C in the embedded way of C code? [[alternative HTML version deleted]]
2005 Mar 17
1
Compiling "embedding R" examples
Hi, I am working at a major financial institution and we would like to embed R in one of our front office application. The application is written in C/C++ so I started by trying to compile the examples in "tests/Embedding" of R 2.0.1. I have modified "tests/Embedding/Makefile" according https://stat.ethz.ch/pipermail/r-help/2005-February/064341.html and set
2006 May 25
1
compiling tests/Embedding
I am compiling the Embedding examples in the tests directory and get an undefined reference. I include the make output as well as grep'd output of nm on libR.so and compiler and arch information. Do I have an improperly built R shared library or is there a problem with the Embedding tests or something else I am not seeing? Thanks for any help! George ost at
2002 Apr 17
1
Problems embedding R in a C application
Hello, I've encountered two serious issues that have stopped me in my tracks, and I would be most grateful to anyone who can provide some answers. I am using the examples provided on the page "Testing the Embeddable R Library". I am writing a C application, that I want to embedd R into (I'm not interested in embedding my application in R, that's not an option). I'm
2005 Mar 17
3
Compiling "R Embedded" examples
Hi, This question was first posted wrongly on R-help. Apologize for the inconvenience. I am working at a major financial institution and we would like to embed R in one of our front office application. The application is written in C/C++ so I started by trying to compile the examples in "tests/Embedding" of R 2.0.1. I have modified "tests/Embedding/Makefile" according to
2007 Oct 13
1
R API - optim
I am trying to use the R API to call optim functions (nmmin, vmmin, lbfgsb, etc.) through a C program but I couldn't find the shared library to link under the R-2.6.0 build which is compiled under Linux (REL5). main.cpp:35: undefined reference to `Rf_initEmbeddedR(int, char**)' main.cpp:41: undefined reference to `nmmin' Thanks in advance for any help. ------------------------
2004 Apr 06
1
A question about embedded R
Hello everyone, I met a strange problem when I call R expression from C++, here is the details: I edited a function eval_R_command(); double eval_R_command(const char *funcName) { SEXP exp,e; ParseStatus status = PARSE_OK; int i,n; double val; PROTECT(exp=NEW_CHARACTER(1)); SET_STRING_ELT(exp, 0, COPY_TO_USER_STRING(funcName)); PROTECT(e = R_ParseVector(exp, 1,
2005 May 02
2
Nonparametric Tukey-type multiple comparisons "Nemenyi" test
I am trying to do a Nonparametric Tukey-type multiple comparison post-hoc test to determine which groups are significantly different. I have read the dialogue on this topic from the R-help, and am still not clear why no statistical packages include this test as an option? Is it not an appropriate test to conduct on non-normally distributed data? Is the only option to calculate it by hand
2005 Nov 27
2
'For each file in folder F do....'
Hello, I have 2700 text files in a folder and need to apply the same program/procedure to each individually. I'm trying to find how to code something like: For each file in <Folder> do {<Procedure>} is there an easy way to do this? other suggestions? I have tried to list all the files names in a vector e.g. >listfiles[1:10,1] 1 H:/Rtest/AXP.txt 2 H:/Rtest/BA.txt 3
2005 Oct 30
1
attaching the debugger to functional test.
People, I''m trying to run the ruby debugger against a Test::Unit::TestCase class which is a parent of a Rails class. I started my study with a simple script: # # bikle_test.rb # require ''test/unit'' class BikleTest < Test::Unit::TestCase def setup @string10 = "hello" end def test10 assert_equal @string10, "hello" end end The
2012 Feb 26
2
Help needed! Error in setwd(newdir) : cannot change working directory
Hi Guys, I am new to R and just trying to write a small script to automate a couple commands. But I run into the setwd(): cannot change working directory. I googled a little bit and tried all fixes/suggestions with no success. Basically I have a script that works from inside a directory with my data (/home/sean/Rtest/Data01). Now I want to modify the script to make it run from the upper directory
2003 Nov 20
1
Compile Packages under Windows and CHM
Hi, I have been developing a small package. It install under RedHat Linux 9.0 without a problem. However, I have a small problem under Windows XP. I am using R-1.8.0 on both systems and HTML Help Workshop 4.74.8702.0 on Windows XP. I created the package under Linux. When I try to install the package created under Linux in Windows XP using c:\rtest> rcmd install rtest I get the following
2005 Oct 08
1
windows/g95 peculiarity
I'm not looking for an answer here, this is just a report of a peculiar event I've observed and can reproduce. I'm developing a g95 (20050129) compiled package on windows xp pro using R-2.1.1, and gcc-3.4.2 (mingw special). An older version of the F95 package compiled and ran without problems. The new version of the package includes extensive changes in the code. The package has a
2008 Aug 30
0
R embedded reinitialization error (PR#12644)
Full_Name: R Embedder Version: 2.7.2 OS: win XP SP 2 Submission from: (NULL) (83.25.35.249) I'm having problems using embedded R. I try to adapt examples from "tests/Embedding/". Everything works fine except when I try to reinitialize R for the second time in the same program. I need to reinitialize correctly because my code is some kind of .dll plugin to an external application.
2003 Sep 01
2
Error in dyn.load
Hi, I've created a shared library from including this code (with g++ -I/usr/local/lib/R/include -I/usr/local/include -c Rtest.cpp; g++ -shared -L/usr/local/lib -o Rtest.so Rtest.cpp): void check_data (SEXP data) { int l=length (data); } But when I try to load it in R I get this error message: unable to load shared library ... ... undefined symbol: _Z9Rf_lengthP7SEXPREC How can I solve
2010 Sep 15
4
Sas to R
Hi, I need to call an R program from Sas. I have tried using the following code in Sas using the x command but it just calls up dos and says 'D:\Program' is not recognized as an internal or external command, operable program or batch file. ] SAS CODE: options xwait xsync; %let Rsource=S:\EPI_Data\Communicable Diseases\DR1355 Historic Communicable Disease Analaysis\R graphics; options
2010 Sep 28
2
Opening a .R file with R (Windows)
I am new to using R. I installed R on my computer (Windows) and everything things appears to be just fine. However, I have a simple script RTest.R that does a few simple calculations. When I double-click the RTest.R icon, I get an Information dialong box which says, "ARGUMENT 'C:\Documents and Settings\kgilder\Desktop\RTest.R' __ignored__" . When I choose OK, R then opens,
2008 Oct 14
1
To all TextMate users that wants to run tests with cmd + r in Rails 2.1 and above.
Because the require ''test_helper'' at the top of all the tests is relative now (it used to be something like require ''../test_helper''), you can''t just run the file with ruby anymore. And running the file with ruby is exactly what command + r does. Which means you can''t easily run your tests from textmate. The solution:
2006 Apr 03
3
New software, test site, OpenProfile
I''ve just put a new Ruby On Rails application up for testing at: <http://rtest.openprofile.net> Open Profile can be used as a login and user profile module for any Ruby On Rails application. Its purpose is to minimize the hassle of joining new web forums (or anything else on the web that requires you to enter a user name, email addres, password twice, etc.). If it''s