[Rd] Mathlib help
Hello, I am trying to make use of the R standalone library in mu own c and fortran code. ( fedora core linux ) Unfortunately I am unable to link and create an executable. See below. It is the example file in "src/nmath/standalone" Does anyone see what I might be missing? % R CMD COMPILE tr.c gcc -I/usr/local/lib64/R/include -I/usr/local/lib64/R/include -I/usr/local/include -fpic -g -O2 -std=gnu99 -c tr.c -o tr.o % R CMD LINK tr.o libtool: link: unable to infer tagged configuration libtool: link: specify a tag with `--tag' Thanks, Bill __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Axis line not appearing with axis(tick=FALSE) (PR#8998)
Full_Name: Sean Pieper Version: 2.3.1 OS: Windows Submission from: (NULL) (67.188.92.37) Hi, I am trying to create a qualitative figure for which I don't want tick marks or numbers, but having some axes would be nice. If I do: plot.new() axis(2,labels=FALSE,tick=FALSE,lty="solid",lwd=1) I expect this should give me a vertical line on the left edge of the plot, but nothing draws. When I run: axis(2,labels=FALSE,tick=TRUE,lty="solid",lwd=1) both the line and the ticks draw If I type: axis(2,labels=TRUE,tick=FALSE,lty="solid",lwd=1) I get numbers, but still no axis line. I also checked with axis(1,...) and saw the same behavior. -sean __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] bug with boot.sw98 function (PR#8999)
Full_Name: Nuno Monteiro Version: 2.3.1 OS: Windows XP HE Submission from: (NULL) (84.9.38.207) I'm using the FEAR library to perform Data Envelopment analysis with a 36,000 obs dataset. The function dea is working fine but then when I try to use the boot.sw98 to come up with some sensitivity analysis I get the following error: boot.sw98(XOBS=x,YOBS=y,NREP=100,DHAT=dhat,RTS=3,ORIENTATION=2) Error in 0:L : NA/NaN argument In addition: Warning message: longer object length is not a multiple of shorter object length in: kappam * Gcounts What does this mean? Is this because I have too many observations? What can I do to fix it? Please let me know if you need further information. Thank you in advance for your cooperation. Regards, Nuno PS here is a transcript of the script I'm using library(FEAR) abc <- read.csv("Jul_data.csv",header=TRUE) x=matrix(nrow=1,ncol=39182) x[1,]=abc$apr_repayment y=matrix(nrow=7,ncol=39182) y[1,]=abc$pcadv y[2,]=abc$until y[3,]=abc$cashback_rate y[4,]=abc$self_certify_ind_d y[5,]=abc$incentive_ind_d y[6,]=abc$features_1 y[7,]=abc$discount dhat=dea(XOBS=x,YOBS=y,RTS=3,ORIENTATION=2) boot.sw98(XOBS=x,YOBS=y,NREP=100,DHAT=dhat,RTS=3,ORIENTATION=2) __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Problems embedding R.
Hi List, I am trying to come to terms with embedding R. I have looked in writing R extensions and a pdf slideshow (by Simon Urbanek) I found on the web and by my reckoning the following should almost work (I use function Rf_initEmbeddedR in the file winembed.c from the Rserv source to initialise R): int main(int argc, char* argv[]){ char *cmd = "rnorm(10)"; SEXP cmdSexp, cmdexpr, ans; int i, Rerror ParseStatus status; if(Rf_initEmbeddedR(argc, argv)){ printf("R failed to initialise\n"); return 1; } PROTECT(cmdSexp = allocVector(STRSXP, 1)); SET_STRING_ELT(cmdSexp, 0, mkChar(cmd)); PROTECT(cmdexpr = R_ParseVector(cmdSexp, -1, &status)); if (status != PARSE_OK) { printf("error in parsing command\n"); UNPROTECT(2); return 1; } R_tryEval(VECTOR_ELT(cmdexpr, 1), R_GlobalEnv, &Rerror); if(Rerror){ printf("error in evaluation attempt\n"); UNPROTECT(2); return 1; } PROTECT(ans = eval(VECTOR_ELT(cmdexpr, 1), R_GlobalEnv)); for(i=0; i<10; ++i) printf("ret %i = %f\n", i, REAL(ans)[i]); UNPROTECT(3); return 0; } when I run this program I get output: ret 0 = 0.00 ret 1 = 0.00 ret 2 = 0.00 ret 3 = 0.00 ret 4 = 0.00 ret 5 = 0.00 ret 6 = 0.00 ret 7 = 0.00 ret 8 = 0.00 ret 9 = 0.00 The reason I say "should almost work" is that I would have thought that the lines: R_tryEval(VECTOR_ELT(cmdexpr, 1), R_GlobalEnv, &Rerror), and PROTECT(ans = eval(VECTOR_ELT(cmdexpr, 1), R_GlobalEnv)); should be: R_tryEval(VECTOR_ELT(cmdexpr, 0), R_GlobalEnv, &Rerror), and PROTECT(ans = eval(VECTOR_ELT(cmdexpr, 0), R_GlobalEnv)); respectively... but these give me access violations (Unhandled exception at 0x10073d34 in R_interface.exe: 0xC005: Access violation reading location 0x515c25ff.) Can anybody help? Simon. R version: 2.2.0 platform: windows dev env: MS VS 2003 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel