Displaying 11 results from an estimated 11 matches for "kyeongmi".
2008 Apr 11
2
system.time gives error when "=" is used for assignment (R-2.6.0)
...t here...)". It happened with a few
functions I tried. Is this a bug or is there any circumstances that
"=" cannot be used for assignment? Here is a real simple example.
fn1 <- function(x) x+1
r1 <- system.time(res1=fn1(2))
r2 <- system.time(res2 <- fn1(2))
Thank you.
Kyeongmi
University of Memphis
2008 Mar 30
1
norm_rand() in R-extension vs rnorm in R ---which is better?
...ood. 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 in C/C++? Or
does anyone know which one between norm_rand() in R-extension and
rnorm in R is better? If anyone could help, I would appreciate it.
Kyeongmi
University of Memphis
2008 May 05
1
Is there any way to find out how a certain functions are implemented in R?
...ew dataset just like I
did it in R using "aggregate(data$variable1,
list(data$variable2,data$variable3), length) or
aggregate(data$variable1, list(data$variable2,data$variable3), sum)
etc". How could I do that in C
and is there any way to find out how it is implemented in R? Thank you.
Kyeongmi
Univ. Memphis
2008 Mar 05
1
Question on "assign(paste.."
...ork.
for (t in 4){
assign(paste("Trt",t,sep=""),rmultinom(10, size = 5,
prob=probTrt[t,]));
rowMeans(paste("Trt",t,sep=""));
}
How can I use it in functions like rowMeans so that I don't have to type all
the object names? Thank you.
Kyeongmi
[[alternative HTML version deleted]]
2009 Mar 19
1
object size of a matrix and a list
...it, I found it contrary. A list that has mixtures of
integers and doubles are larger in size than a matrix that has only doubles. Do
lists always take up more space than matrices if they have the same/similar
variables? I just want to know it for the sake of efficiency. Thank
you for your time.
Kyeongmi
My short test program is here:
#matrix
beta.mat <- matrix(0,nr=5, nc=2)
for (i in 1:5){
beta.mat[i,] <- c(i,i*10.0)
}
#list
gamma.mat <- list()
for (i in 1:5){
gamma.mat$aa[i] <- i
gamma.mat$bb[i] <- i*10.0
}
object.size(beta.mat) #2...
2008 Apr 18
1
R-extension in unix system -- help to locate header files
...directory of my
school computer to find it. Same for other header files...
Is there better way to do it? Or is there any package for unix that
has "all" the
needed header files so that I can download them only once and don't
have to search
for them? I appreciate your help in advance.
Kyeongmi
University of memphis
2008 Nov 06
1
trouble with for loop
...;, "result2.txt", "result3.txt",
"result5.txt"... When I use for loop to read it, it gets an error at
"result4.txt" so that "result5.txt"... are not read. I attached an
example program here. Could anyone help me? I appreciate your time in
advance.
Kyeongmi
#create dataset name
for (i in 1:6){
assign(paste("newname",i,sep=""), paste("result",i,".txt",sep=""))
}
ls()
#read data if there are files with the name: "result1.txt",
"result2.txt", "result3.txt",
"result5....
2008 Jul 25
0
nlminb--lower bound for parameters are dependent on each others
...ction2, lower = c(0, -c1/res2$par[1]),
upper = Inf)
param.new2<-res2$par
difference.Params <-max(abs(param.new1-param.new2))
}
I got error message:
Error in -res1$par[1] : invalid argument to unary operator
Is there any way to implement this constraint? Thank you for your help in
advance.
Kyeongmi
-----
Kyeongmi,
University of Memphis
--
View this message in context: http://www.nabble.com/nlminb--lower-bound-for-parameters-are-dependent-on-each-others-tp18644373p18644373.html
Sent from the R help mailing list archive at Nabble.com.
2008 May 04
1
help with segmentation fault
...dereferencing pointers or go out of edge of arrays. But the very same
codes were fine in windows
and I did not find any related errors in my codes. How could this
happen and how can I fix it? Does this have to do with different
systems (linux vs windows) or C/R program?
Thank you in advance.
--
Kyeongmi
Univ. Memphis
2008 Apr 08
1
Using Rtools in Unix environment
...ower5+ CPUs (1.9 GHz) and 16 GB of RAM each. All
pSeries nodes run IBM AIX 5.3
...
Do you think I can use my C codes and R codes I already wrote in
windows? Or should I write my codes in unix all over? I never used
unix before and have no idea on it. If anyone could help, I would
appreciate that.
Kyeongmi
University of Memphis
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