similar to: Problem when calling FORTRAN subroutine (dll)

Displaying 20 results from an estimated 600 matches similar to: "Problem when calling FORTRAN subroutine (dll)"

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
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
2012 Apr 04
1
Shapiro-Wilk cpoefficients: 2 Qs
Greetings! I want to have the coefficients that R uses in shapiro.test() for the Shapiro-Wilk test for a prticular sample size, i.e. the a[i] in W = Sum(a[i]*x[i])/(Sum(x[i] - mean(x))^2) (where the x[i] are sorted). Two questions: Q1: Is there a readymade R function from which I can extract these? Q2: I was wondering if I might be able to modify the code for the function shapiro.test() so
2003 Dec 10
3
expressing functions
# Why does expressing one function require(ctest) t.test # return only function (x, ...) UseMethod("t.test") <environment: namespace:ctest> # but expressing another function shapiro.test # returns more complete code? function (x) { DNAME <- deparse(substitute(x)) x <- sort(x[complete.cases(x)]) n <- length(x) if (n < 3 || n > 5000)
2002 May 30
1
problem of compile fortran program
I want to call dll from R but encounter problem in compiling the fortran program. First I try "Rcmd shlib prog.f", it failed and warning: make[1]: `libR.a' is up to date. make: *** No rule to make target `'prog.o', needed by `prog.a'. stop. Then I try to compile it by absoft fortran compiler, it works and produces prog.dll. But when this routine is called in R, it
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
2008 Nov 21
1
Bug in Kendall for n<4?
> library(Kendall) > Kendall(1:3,1:3) WARNING: Error exit, tauk2. IFAULT = 12 <<<<<< tau = 1, 2-sided pvalue =1 I believe Kendall tau is well-defined for this case and the reported value is correct; isn't it a bug to give a warning? (And if, e.g., the pvalue is not well-defined in this case, wouldn't it be better to return NA or NaN or something?) Also,
2006 Feb 07
1
Reading in FORTRAN data using R
Hi There: I was wondering if there is a way to read FORTRAN list data (similar to IDL's readf function). I often use FORTRAN for most of my number crunching, and use something like IDL to visualize and perform statistical analysis on that data. Since the each file is rather large (>100 Mb), formatting the output into columns or tables is impractical, hence the "list"
2011 Apr 28
1
Coding design with repeated measurements in the survey package
Dear all, I'm working on a design with rotating panels. Each site is sampled every X year. Have a look at the code below the get an idea of the design. In reality the number of sites will be (much) higher. However I'm not sure if I coded the design correctly in svydesign(). Can someone confirm that it is either correct or wrong? I've added the lmer() equivalent that I want to
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:
2009 Jan 07
0
How-To extract data from a matrix of lists subject to a set of given constraints
My goal is to store the DWT coefficients from a number of time series in such a way to be able to extract subsets satisfying giben conditions. I have defined the following 11 matrices whose x-axis represent time intervals and y-axis represent the number of time series: MS <- 11 d1.mat <- matrix (data=list(), nrow=TotNumCycles, ncol=2^(MS-1)) d2.mat <- matrix (data=list(),
2009 Jul 06
0
Error exit, tauk2. IFAULT = 12
Dear McLeod, I am a PhD student working with the Kendall package in R. I used this package to make the so-called TauKr matrix correlation analysis (Hemelrijk, 1990). However, lately I've been getting this warning: Error exit, tauk2. IFAULT = 12. From the forums I've been looking into, I noticed that when this warning pops up, it means that the p-value of the correlation may be wrong
1999 Jul 15
0
Strange behaviour using .Fortran
Hello everybody, I observed some strange behaviour of R (0.64.1/Linux 2.0.25) when trying to use FORTRAN-libraries. I first downloaded "ALGORITHM AS 304" from StatLib. All I changed at the code, was to substitute "REAL"-routines by "DOUBLE PRECISION". Compiling went o.k.: > g77 -fpic -O2 -shared -o rtest.o fisher.f ("g77 --version" gives 2.7.2.1)
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
2012 Jan 14
1
Error: unexpected '<' in "<" when modifying existing functions
Hi. I am trying to modify kmeans function. It seems that is failing something obvious with the workspace. I am a newbie and here is my code: myk = function (x, centers, iter.max = 10, nstart = 1, algorithm = c("Hartigan-Wong", + "Lloyd", "Forgy", "MacQueen")) + { + do_one <- function(nmeth) { + Z <- switch(nmeth, { + Z
2010 Aug 25
4
Merging two data set in R,
Dear R Gurus, I am currently working on the two dataset ( A and B), they both have the same fields: ID , REGION, OFFICE, CSTART, CEND, NCYCLE, STATUS and CB. I want to merge the two data set by ID. The problem I have is that the in data A, the ID's are unique. However in the data set B, the ID's are not unique, thus some repeat themselves. How do I the merge or retrieve the
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: ***
1999 Jul 15
1
Strange behavior using .Fortran
Hello everybody, I observed some strange behavior of R (0.64.1/Linux 2.0.25) when trying to use FORTRAN-libraries. I downloaded "ALGORITHM AS 304" from StatLib. All I changed at the code, was to substitute "REAL"-routines by "DOUBLE PRECISION". Compiling went o.k. ... > g77 -fpic -O2 -shared -o rtest.o fisher.f ("g77 --version" gives 2.7.2.1)