similar to: object size of a matrix and a list

Displaying 20 results from an estimated 10000 matches similar to: "object size of a matrix and a list"

2008 Nov 06
1
trouble with for loop
Hello, I'm having two similar problems with for loop and I would appreciate any help or comment. I want to use "for loop" to calculate series of initial values for an optimization problem. But some initial values have my function quit due to problems like calculating the inverse of singular matrices. I don't want to make my program check determinants and skip it if it is
2008 May 04
1
help with segmentation fault
Hello all, I'm trying to have C called by R. I wrote C codes that worked perfectly fine with R-2.6.0 in windows system ( using R tools). I had to change to SuSE Linux (this system has 3.2 GHz Intel Xeon processors and 4 GB of RAM), the C codes were compiled okay but when it was called to R-2.6.2, I got error mesage : ***caught segfault*** address 0x1df5000, cause 'memory not
2008 Mar 30
1
norm_rand() in R-extension vs rnorm in R ---which is better?
I need to generate good quality of random numbers from univariate normal distribution for further transformation. I tried rnorm in R but it was not good sometimes. Someone said C++ standard library or Fortran's built-in functions for that are good. I found that there is double norm_rand() in R-extension. Does this function, norm_rand() use the same algorithm as rnorm in R or something similar
2008 May 05
1
Is there any way to find out how a certain functions are implemented in R?
Hello I wrote a bootstrap program in C language that is called and run by R. When I tried it, it is slow and I'm trying to write and run the whole thing in C. But I cannot use handy functions in R and need to figure out how to write those functions by myself. Is there any way that I can get the actual codes that implement functions in R so that I can translate them into other languages? For
2008 Apr 11
2
system.time gives error when "=" is used for assignment (R-2.6.0)
Hello list, I found that system.time works correctly when I used "<-" to assign a value to a variable but when I happened to use "=" instead of "<-", R gave an error message: "Error in system.time(your argument here...)". It happened with a few functions I tried. Is this a bug or is there any circumstances that "=" cannot be used for
2008 Mar 05
1
Question on "assign(paste.."
Hello, I'm having trouble in using "assign(paste ..." command . I could create several dataframes following trinomial distribution using it but it could not be used to check their row means of the created dataframe. For example, the following works: probTrt=matrix(0,4,3); probTrt; #malf, death, normal probTrt[1,]=c(0.064,0.119,0.817);#for Trt 1 probTrt[2,]=c(0.053,0.125,0.823);#for
2000 Mar 14
1
qr.solve (fwd)
Two friend reported me a problem, which I can't solve: (I run R-1.0.0, Debian Linux) They hava a function "corr.matrix" (see end of mail), and when they create a 173x173 matrix with this function V <- corr.matrix(0.3, n=173) V1 <- qr.solve(V) reports: Error in qr(a, tol = tol) : NA/NaN/Inf in foreign function call (arg 1) For n < 173, qr.solve returns the correct
2008 Apr 18
1
R-extension in unix system -- help to locate header files
Hi list, To call C, I used to use R-extension in windows but I'm moving to unix system because my PC doesn't have enough memory. My C codes requires to include the following header files: #include <stdlib.h> #include <R.h> #include <Rdefines.h> #include <Rmath.h> #include <R_ext/Applic.h> #include <R_ext/PrtUtil.h> In windows, I had no problem with it
2008 Apr 08
1
Using Rtools in Unix environment
The previous mail I wrote was bounced for some reason and I'm writing it again... I have used Rtools in windows to call C from R but my computer does not have enough memory for my current project. So I'm trying to use Rtools in the high performance computer at my school. The guy who handles the HPC says it's Unix and I have three questions: 1. I found from the web that Unix has
2010 Jun 15
2
Integration problem: error in invoking an outside function
Dear all, Currently I am trying to integrate a function which depends on four variables, two of which are given, one is given in the integrate function, so there is one variable to integrate on. The code is as follows: Pmatrix = function(th) { P = matrix(nrow=6, ncol=6, data=0) P[1,1] = P[2,1]=P[3,2]=P[4,3]=P[5,4]=P[6,5]= exp(-th) P[,6] = 1-exp(-th) return(P)} lim.verd =
2010 Jul 08
1
mimic SPSS contingency table results
Dear all Seems that puzzles always come in packs. I was asked to help with some statistics in blood analysis. (You can not refuse your wife's asks :-). She has contingency table for values IgVH mutation and ZAP expression. I can do chi-square test (in R) and get a results, and with some literature I can try explain them. However she found an article in which they use SPSS and use
1999 Sep 30
3
plotting text on a postscript device
It seems that the text command isn't working for a postscript device. Here is my code: #----------------------------- # I have stored some data in a 21 by 21 matrix called mat x <- 1:ncol(mat); y <- 1:nrow(mat); labs <- c(" ", "1298", "1537", "TP53", "786", "974", "1303", "1288", "1294",
2008 Mar 07
1
parameters for lbfgsb (function for optimization)
Can anyone help me with lbfgsb (function for optimization)? It takes the following parameters: void lbfgsb (int n, int lmm, double *x, double *lower, double *upper, int *nbd, double *Fmin, optimfn fn, optimgr gr, int *fail, void *ex, double factr, double pgtol, int *fncount, int *grcount, int maxit, char *msg, int trace, int nREPORT); What do I put for parameter ex (11th parameter)? I looked at
2011 Jul 01
1
Reverse legend label order in barplot
Hi list, I've thus far not found a solution to my problem and hope someone can help. I have a data matrix and wish to plot a stacked bar plot using barplot(). This is simple enough, but I have a problem with the legend labels being in the reverse order from what I want. The default appears to have labels ascending bottom-to-top reflecting bottom-to-top sub-bars, but I would like the
2010 Jul 06
2
grayscale wireframe??
I need grayscale formatting for a wireframe. The only col.regions that I can find are color palettes are all colored: rainbow(n, s = 1, v = 1, start = 0, end = max(1,n - 1)/n, gamma = 1, alpha = 1) heat.colors(n, alpha = 1) terrain.colors(n, alpha = 1) topo.colors(n, alpha = 1) cm.colors(n, alpha = 1) The code follows: X11() library(lattice) par(family="serif", cex=1.2)
2017 Dec 21
1
develop.raw error ( adimpro )
Hello all, I'm trying to use the adimpro package to read RAW files (image). Make readins is OK! > r <- read.raw( '20171218_210956.dng', type='RAW', compress=FALSE ) > summary( r ) > ### cut the many lines... Filter pattern: GR/BG > extract.info( r ) [1] "GR/B" > To next, develop the raw file using the "develop.raw" function. But the
2010 Jan 26
3
Problem with "nls" function
Dear R users, I have a response variable in a csv file called "y" and a matrix of predictor variables in a csv file called "mat". I have used the function "nls" I have specified the nonlinear relation between these variable.The code I have witten is called Rprog which begins with the phrase: L.minor.m1<-nls(Y~a ....etc.. The program when I execute the program, I
2013 Sep 22
2
colores
Como usas la función image puedes consultar la ayuda ?image o help(image) y encontrarás el siguiente ejemplo donde se usa un diferente color Palette (mencionada por pepeceb en su respuesta). x <- 10*(1:nrow(volcano)) y <- 10*(1:ncol(volcano)) image(x, y, volcano, col = terrain.colors(100), axes = FALSE) # O puedes usar directamente el número para indicar el color image(x, y, volcano, col =
2007 Apr 08
0
Simulation of the Frailty of the Cox PH model
Dear R-list users, I am trying to do simulation of survival data to enable it to run under frailty option. Below is the function a that I am using. My questions are: 1. How do I modify it to get bigger (hopefully significant) value of Variance of random effect? 2. What changes do I have to make in the function to run it under correlated frailty model? (may be in kinship package) 3. Is there
2006 Dec 25
1
Bayesian data mining
Hi, I need a help to know whether I can perform the following in R: I have a set of observations (Ns) and each observation is drawn from a poisson distribution with an unkown mean, lambda. The set of lambdas in their turn are drawn from a common prior distribution which is supposed to be a a mixture of two gamma distributions. Is there a way to determine the poisson means in R, given the Ns and