similar to: problem of compile fortran program

Displaying 20 results from an estimated 1900 matches similar to: "problem of compile fortran program"

2008 Mar 12
1
Problem when calling FORTRAN subroutine (dll)
Hello, I am trying to call a FORTRAN subroutine from R. The Fortran code is @: http://lib.stat.cmu.edu/apstat/206 It performs a bivariate isotonic regression on a rectangular grid (m X n) matrix. I used the g77 compiler and successfully created a dll file and it also loads successfully from R. But somehow the programs fails to run properly. (I do get the correct result when I compile the
2005 Nov 23
4
x[1,], x[1,,], x[1,,,], ...
Hi, is there a function in R already doing what I try to do below: # Let 'x' be an array with *any* number of dimensions (>=1). x <- array(1:24, dim=c(2,2,3,2)) ... x <- array(1:24, dim=c(4,3,2)) i <- 2:3 ndim <- length(dim(x)) if (ndim == 1) y <- x[i] else if (ndim == 2) y <- x[i,] else if (ndim == 3) y <- x[i,,] else ... and so on. My current
2004 May 27
1
R-1.9.0: Error in paste(ncomp, "LV's") : Argument "ncomp" is missing, with no default
Is it just my installation or bug in 1.9.0 ? The same thing works fine in 1.8.1 Best regards, Ryszard # R-1.9.0 library(pls.pcr) nr <- 8; ndim <- 2 x <- matrix(rnorm(nr*ndim), nrow=nr) y <- as.matrix(x[,1]) for (i in 2:ndim) y <- y + x[,i] y <- y + rnorm(length(y)) m <- pls(x,y,validation='CV') # Error in paste(ncomp, "LV's") : Argument
2011 Mar 27
1
run function on subsets of matrix
I was wondering if it is possible to do the following in a smarter way. I want get the mean value across the columns of a matrix, but I want to do this on subrows of the matrix, given by some vector(same length as the the number of rows). Something like nObs<- 6 nDim <- 4 m <- matrix(rnorm(nObs*nDim),ncol=nDim) fac<-sample(1:(nObs/2),nObs,rep=T) ##loop trough different
2007 Oct 29
1
meaning of lenwrk value in adapt function
R-listers, In using the adapt function, I am getting the following warning: Ifail=2, lenwrk was too small. -- fix adapt() ! Check the returned relerr! in: adapt(ndim = 2, lower = lower.limit, upper = upper.limit, functn = pr.set, Would someone explain what the 'lenwrk' value indicates in order to help diagnose this issue. Also, what are the possible codes for Ifail, so I can set
2007 Mar 28
1
warnings on adapt
Hi all I was wondering if someone could help me. I have to estimate some parameters, so I am using the function nlm. Inside this function I have to integrate, hence I am using the function adapt. I don't understand why it is giving the following warnings: At the beginning: Warning: a final empty element has been omitted the part of the args list of 'c' being evaluated was:
2018 Jul 02
1
MARGIN in base::unique.matrix() and base::unique.array()
Hi, The man page for base::unique.matrix() and base::unique.array() says that MARGIN is expected to be a single integer. OTOH the code in charge of checking the user supplied MARGIN is: if (length(MARGIN) > ndim || any(MARGIN > ndim)) stop(gettextf("MARGIN = %d is invalid for dim = %d", MARGIN, dx), domain = NA) which doesn't really make sense. As
2008 Oct 19
1
multivariate integral with ADAPT when the parameter is close to boundary
Dear All, There is one problem I encountered when I used ADAPT to compute some 2-D integral w.r.t beta density. For example, when I try to run the following comments: fun2<-function(theta){return(dbeta(theta[1],0.005,0.005)*dbeta(theta[2],0.005,0.005))} int.fun2<-adapt(ndim=2,lo = c(0,0), up = c(1,1),functn = fun2,eps = 1e-4) It seems it will take very long time to run. Acturally, I
2002 Feb 25
0
RE: R crashes when .Fortran embeded function, is called twice in R --> solved
Hi all, Thanks to everybody who thought on this problem, there was slight mistake in the fortran code which lead to NULL pointer allocation error, but still it surprises me that why it does not crib in the first run. The compiler I am using is absoft fortran compiler. Cheers, -Jag Jagadish Rangrej ( Statistician ) CHEO Research Institute, Ottawa, ON 613-7383951 > -----Original Message-----
2006 Oct 09
1
Problem building a DLL from Fortran 90 source under Windows (with solution)
Hi, All, I have come across a problem building a DLL from .f90 source (R 2.3.1, Windows XP). When using the R CMD SHLIB procedure, the DLL itself was being built, but its export table was empty. Among the output from R CMD SHLIB the following message appeared: c:\mingw\bin\nm.exe: 'a.out': No such file The reason is the empty list of dependencies in the pattern rule for DLLs
2011 Oct 07
1
Strange behaviour with the Homals Package
Dear R users and experts, I am using Homals to perform categorical PCA on some survey data. The documentation is a bit obscure, however, I followed the examples. X is a matrix with ordinal 1-5 Likert scale entries on 24 questions from about 2500 respondents. So I run X.nlpc = homals(X, rank = 1, level = "ordinal", ndim = 10) to get the first 10 pc's (the number of dimensions is
2007 Nov 02
0
applying duplicated, unique and match to lists?
Dear R developers, While improving duplicated.array() and friends and developing equivalents for the new ff package for large datasets I came across two questions: 1) is it safe to use duplicated.default(), unique.default() and match() on arbitrary lists? If so, we can speed up duplicated.array and friends considerably by using list() instead of paste(collapse="\r") 2) while
2013 Oct 18
1
crr question‏ in library(cmprsk)
Hi all I do not understand why I am getting the following error message. Can anybody help me with this? Thanks in advance. install.packages("cmprsk") library(cmprsk) result1 <-crr(ftime, fstatus, cov1, failcode=1, cencode=0 ) one.pout1 = predict(result1,cov1,X=cbind(1,one.z1,one.z2)) predict.crr(result1,cov1,X=cbind(1,one.z1,one.z2)) Error: could not find function
2011 Dec 15
3
From Distance Matrix to 2D coordinates
Dear All, I am struggling with the following problem: I am given a NxN symmetric matrix P ( P[i,i]=0, i=1...N and P[i,j]>0 for i!=j) which stands for the relative distances of N points. I would like use it to get the coordinates of the N points in a 2D plane. Of course, the solution is not unique (given one solution, I can translate or rotate all the points by the same amount and generate
2010 Mar 16
1
Problem with S3 to S4 transition
Hello to everybody I am developing a package using R and have the following problem: I used to work in a mixture of S3 and S4 mechanism environment: as a matter of fact, I used to define my classes (say "DB" for illustration) using the setClass function (with representation field), and I was using the S3 implicit mechanism writing the functions: print.DB and plot.DB. Recently, I
2001 Oct 18
3
Rcmd SHLIB in rw1031 (R for Win)
Thanks for the answers on readme.packages. I have installed Rw1031 from SetupR.exe including the option for compiling source files and, following directions in www.stats.ox.ac.ul/pub/Rtools, have installed: -tools.zip -Perl (Active Perl) -mingw-1.1.tar.gz -copied sh.exe to c:\bin\sh.exe After Perl installation, its directory is added to my path. I have also added the directory where the R
2001 Dec 12
1
RE: [R] Rcmd SHLIB problem
Yes, changing line 67 of SHLIB as Uwe suggested worked: C:\TEMP>Rcmd SHLIB tryf.f make[1]: `libR.a' is up to date. rm -f -f tryf.a ar cr tryf.a *.o ranlib tryf.a ------- Building tryf.dll from tryf.a -------- echo LIBRARY tryf > tryf.def echo EXPORTS >> tryf.def nm tryf.a > Defs sed -n '/^........ [BCDRT] _/s/^........ [BCDRT] _/ /p' Defs >> tryf.def rm -f Defs
2002 Apr 30
1
makefile for standalone lib
It appears the Makefile.win in src/nmath/standalone might need some modification since cd src/nmath/gnuwin32 make -f Makefile.win make -f Makefile.win test fails. However if I remove libRmath.a from line 15 OR modify lines 67/68 replacing Rmath.a with libRmath.a then make -f Makefile.win test goes as expected. _________________________________________________________________
2011 Jul 01
4
Access only part of last dimension of table/matrix
I would like to do some operations inside a function using only one value for the last dimension of a table/matrix: tabfn <- function (dfrm, facvec, YN ="event"){ return( Etbl <- do.call(table, dfrm[ , c(facvec, "event") ]) ) # just want Etbl[,,,"TRUE"] or Etbl[,, "TRUE"] or Etbl[,"TRUE"] }
2004 Aug 19
0
suggesting a new feature for unique()
Dear R-devel, May I suggest that a new feature be added to a couple of unique() methods? Sometimes it's useful to have the indices of the original data that the unique elements come from, so that the original data can be recreated from the unique()ed data. I suggest that an `index' argument be added for unique. Below is a suggested patch against R/src/library/base/R/duplicated.R: ***