similar to: Linking to lapack

Displaying 20 results from an estimated 2000 matches similar to: "Linking to lapack"

2011 Mar 04
3
Generic mixup?
Hello list. This is from an R session (admittedly, I''m still using R 2.11.1): > print function (x, ...) UseMethod("print") <environment: namespace:base> > showMethods("print") Function "print": <not a generic function> Don''t the two results contradict each other? Or do I have a terrible misunderstanding of what
2011 Jan 20
2
Using a list as multidimensional indexer
Hello list. Another 'puzzle' for which I don't have a clean solution. Say I have a multidimensional object, e.g.: Mm<-matrix(1:6, nrow=2, dimnames=list(c("a","b"), c("g","h","i"))) And on the other hand I have a list Ind<-list("b","g") This holds, for each dimension, an indexer for that dimension. Now I would
2011 Sep 22
4
R CMD check file issues
This problem is likely to be specific to Windows, and particularly Win7. After a successful build of a package (R CMD build addendum), I immediately run an R CMD check for the same package. Not always, but _very_ often, I get the following error: C:\Users\nisabbe\Documents\@Doctoraat\R>R CMD check addendum Loading required package: tcltk Loading Tcl/Tk interface ... done Loading
2011 Jan 28
1
plot not generic
Hello list. I was trying to see some of the code for plot.glmnet in package glmnet (this function name is in the documentation). After loading the library, I tried the obvious typing in the name, but I received a message telling me it could not be found. So I fiddled around a little, and noticed that R does not recognize ''plot'' as a generic function, and as such,
2011 Jan 28
2
Injecting code in a package?
Dear list, I''ve had this a few times now, and wonder if this is possible: I''m using a package, often for plotting something, but I want to tune the way the plotting goes, in a way that was not foreseen by the maker of the package. Now, most of the time, these kinds of R functions (say pkg::plot.something) call into other R functions (say pkg::plot.something.internal), and
2010 Dec 07
1
Dataframe from list of similar lists: not _a_ way, but _the best_ way
Hi All. I often find myself in this situation: . Based on some vector (or list) of values, I need to calculate a few new values for each of them, where some of the new values are numbers, but some are more of descriptive nature (so: character strings) . So I use e.g. sapply, passing a custom function that returns a list with all the calculated values . The result of
2011 Apr 29
2
abline outside of plot region
Hi R people. I ran into this problem: I created a plot with errbars, like this: > errbar(x=c(1,2,3,4), y=c(2,1,3,3), yminus=c(1.5,0.5,2.5,2.5), yplus=c(2.5,1.5,3.5,3.5)) Next, I wanted to accentuate some x value with an abline, like this: > abline(v=2) In one of my R sessions (which admittedly I have had open for quite a while now), the abline draws outside of the plotting region
2012 Jun 01
1
Dependencies on recommended packages
Dear all, I've recently had some issues getting my package to successfully "check". This was on R-Forge, so it's not obvious for me to provide SessionInfo or the likes (if necessary, Stefan can chime in?). After some research (mainly by Stefan Theussler, driving force behind R-Forge), this turned out to be the root cause: On R-Forge, the version of R installed was the
2011 Sep 22
1
R check error / update.packages
While building/checking a package of mine that depends on glmnet, I got the following message: * checking whether the name space can be loaded with stated dependencies ...Warn ing: running command ''"C:/Users/nisabbe/Documents/R/R-2.13.1/bin/i386/Rterm.exe" R_DEFAULT_PACKAGES=NULL --vanilla --slave -f C:\Users\nisabbe\AppData\Local\Tem p\RtmpZpjj07\Rin121ae93''
2011 Jan 19
1
expand.grid
Hello list. I feel like an idiot. There exists a method called expand.grid which, from the documentation, appears to do just what I want, but then it doesn''t, and I can''t get it to behave. Given a dataframe dfr<-data.frame(c1=c("a", "b", NA, "a", "a"), c2=c("d", NA, "d", "e", "e"),
2010 Dec 08
2
problem accessing complex list data frames
Hi all. I am currently attempting to build a list of sparse matrixes. That I have already achieved, by > vmat <- list() > for (i in 1:n) { > vmat <- c(vmat, sparseMatrix(i,j,x=data) > } How I am trying to select those elements from the list where the column e.g. 999 is not null. I can do this for one of the sparse matrices with > which(vmat[[1]][,999] != 0) which
2011 Feb 01
2
Preparing dataset for glmnet: factors to dummies
Hello list. For some reason, the makers of glmnet do not accept a dataframe as input. They expect the input to be a matrix, where the dummies are already precoded. Now I have created a sample dataset with . 11 factor columns with two levels . 4 factor columns with three levels . 135 continuous columns (from a standard normal) . 100 observations (rows) Say this dataframe is in dfrPredictors. What
2009 Sep 04
1
calling Lapack and BLAS routines from C
Hi, I am working on a UNIX machine and I am interfacing R and C with the .C function. I am trying to call LAPACK and BLAS routines, but am running into a problem where, while I am able to run the BLAS routines, I cannot run the LAPACK routines. I compile my .c file (at end of email) in the following way: [mhitczen at jlogin2 ~/Cstuff]$ R CMD SHLIB testmore.c gcc -std=gnu99
2014 Dec 20
2
Unexplained difference between results of dppsv and dpotri LAPACK routines
Dear R contributors, Considering the following sample C code, that illustrates two possible uses of a Cholesky decomp for inverting a matrix, equally valid at least in theory: SEXP test() { int d = 2; int info = 0; double mat[4] = {2.5, 0.4, 0.4, 1.7}; double id[4] = {1.0, 0.0, 0.0, 1.0}; double lmat[3]; F77_CALL(dpotrf)("L", &d, mat, &d, &info); lmat[0] = mat[0]; lmat[1]
2011 Apr 01
3
programming: telling a function where to look for the entered variables
Hi there, Could someone help me with the following programming problem..? I have written a function that works for my intended purpose, but it is quite closely tied to a particular dataframe and the names of the variables in this dataframe. However, I'd like to use the same function for different dataframes and variables. My problem is that I'm not quite sure how to tell my function in
2011 Mar 31
3
choosing best 'match' for given factor
Folks, I have a 'matching' matrix between variables A, X, L, O: > a <- structure(c(1, 0.41, 0.58, 0.75, 0.41, 1, 0.6, 0.86, 0.58, 0.6, 1, 0.83, 0.75, 0.86, 0.83, 1), .Dim = c(4L, 4L), .Dimnames = list( c("A", "X", "L", "O"), c("A", "X", "L", "O"))) > a A X L O A 1.00 0.41
2011 Sep 06
0
do.call and sys.call: suggestion for improval?
Hi all. I'll start by introducing the origin of the problem, although it appears to me that it goes beyond my specific setting. I'm currently working on a method for finding the 'lowest named function call' on the call stack. I am aware that the name of a function is not uniquely defined, but for most reasonable cases, the intended name can be easily induced. You can see some of
2011 Aug 10
2
glmnet
Hi All,  I have been trying to use glmnet package to do LASSO linear regression. my x data is a matrix n_row by n_col and y is a vector of size n_row corresponding to the vector data. The number of n_col is much more larger than the number of n_row. I do the following: fits = glmnet(x, y, family="multinomial")I have been following this
2011 Jan 13
1
Repeating value occurence
How can achieve this in R using seq, or rep function c(-1,0,1,0,-1,0,1,0,-1,0) The range value is between-1 and 1, and I want it such that there could be n number of points between -1 and 1 Anyone? Please help Thanks Rusty [[alternative HTML version deleted]]
2010 Oct 25
1
if statement and truncated distribution
Hi R helpers, I am trying to use the if statement to generate a truncated random variable as follows: if (y[i]==0) { v[i] ~ rnorm(1,0,1) | (-inf ,0) } if (y[i]==1) { v[i] ~ rnorm(1,0,1) | (0, inf) } I guess I cannot use " | ( , ) " to restrict the range of a variable in R. Could you let me know how to write the code correctly in R? Many thanks for your help. Maomao [[alternative