Skip to content

Search Archives

Search tips
from:Name Search by author name, e.g. from:Duncan Murdoch "exact phrase" Match an exact phrase word1 word2 Match messages containing both words Date range Use the date pickers to filter results to a time period

Use the list dropdown to narrow results to a specific mailing list. Combine from: with other terms to filter by author and content.

76 results for “from:tong”

Matrix multiplication (with multidimensional array)
Tong Wang · Jun 24, 2007 · r-help

Hi All, I am wondering if there is an efficient way to do the following matrix multiplication, a[1,,] 1, 2 3, 4 a[2,,] 4, 3 2, 1 b[1,,] 5,6 7,8 b[2,,] 8,7 6...

Problem with dgamma ?
Tong Wang · Apr 22, 2007 · r-help

Hi All, Here 's what I got using dgamma function : > nu<-.2 > nu*log(nu)-log(gamma(nu))+(nu-1)*log(1)-nu*(1) [1] -2.045951 > dgamma(1,nu,nu,1) [1] 0.0801333 > dgamma(1,nu,nu,0...

Problem with Cygwin
Tong Wang · Apr 1, 2007 · r-help

Hi All , I am trying to compile some c codes with R CMD SHLIB on Cygwin. But I got the following error WARNING: ignoring environment value of R_HOME ERROR: R_HOME ('/home/Owner/r/R-2.0.1') not...

Question about the xgobi package
Tong Wang · Jan 25, 2007 · r-help

Hi, When I tried an example of the xgobi function, I got the following error. Could someone explain to me what is wrong ? Thanks a lot. xgobi(crabs,colors=c("SkyBlue","SlateBlue","Orange","Red")[rep(1:4,each=50)]) c...

Strange number produced by dnorm
Tong Wang · Apr 3, 2007 · r-devel

Hi All, I just started to learn compiling C codes for R usage, and got a problem when I was playing with my 'hello world' code. #include <R.h> #include <Rdefines.h> #include <Rmath.h> SEXP test( ) { double x; x...

Questions about paste and assign
Tong Wang · Jan 13, 2007 · r-help

Hi, I would like to assign a value to a member b of the list a in position 3, by calling: assign( target, 2.34, 3) My question is what the "target" should be. I tried target <- paste("a", $, "b...

Question about managing searching path
Tong Wang · Oct 17, 2006 · r-help

Hi all, I'm having sometrouble with managing the seach path, in a function , I need to attach some data set at the begining and detach them at the end, say, myfunction<- function() { attach(mylist); ............. detach(mylist) } , the problem is...

Question about do.call()
Tong Wang · Sep 11, 2006 · r-help

Hi, I'm writing a function f() which includes probability density function computation, I would like to make this generic, that is , I will specify the density when I call f(), here's what I wrote: do.call(den, args...

identify high dimension data point
Tong Wang · May 10, 2006 · r-help

Hi there, I am having some trouble with the Identify() function, it looks that the identify() function only works on the plot of 2-dimension data set. In high-dimension case , if I use pairs() + identify() in hope to observe...

Partial structural Change in STRUCCHANGE PACKAGE
Yen H., Tong · Feb 18, 2005 · r-help

Hi, I am using the Strucchange package in R to test for structural change in regression coeffcient. Given a model y = b0 + b1*X + b2*Z, the Fstats test whether there is a change in both b1 and b2 over...

need help with debug package
Tong Wang · Jan 3, 2007 · r-help

Hi all, I met a problem while using the debug package, I have the following program: mainfun<- function(){ beta<-1 result<-subfun(beta+x) } subfun<-function(expr){ y <- eval(expr, envir=list(x=c(1,2)),enclos = parent.frame()) return...

A question about gc()
Tong Wang · Sep 5, 2006 · r-help

Hi everyone, I am doing some intensive computation: 50000 regressions of the form Y~X with each y of size (1,1000) , even if I break invoke gc() for a few time in the loop, it still breaks down at...

Compile C codes for R use.
Tong Wang · Apr 1, 2007 · r-help

Hi, all I was learning to compile C code for use in R, but I got stuck on the first step. I am using the R in windows ( 2.4.1 binary) , I opened the command prompt (Run) in windows...

Problem with rnorm ?
Tong Wang · May 11, 2007 · r-devel

Hi, I couldn't get the rnorm() work right in C, for example, the following code produce strange results. #include <stdio.h> #include <Rmath.h> int main(void){ double x[3]; for(int i=0;i<3;i++) x[i...

A question about dput
Tong Wang · Feb 1, 2007 · r-help

Hi, I am trying to output a R data set for use in WinBugs, I used dput(list(x=rnorm(100),N=100),file="bug.dat") But I can't get the intended format: list(x=c(.......),N=100), instead...

How to pass expression as an argument
Tong Wang · Sep 27, 2006 · r-help

Hi, I am writing a function and need to pass a function expression as an argument, for instance, myfun <- function( express) { x<- c(1,2,3) y<-express } if I call the above function by myfun( x*2 ), I get...

A question about R environment
Tong Wang · Jan 8, 2007 · r-help

Hi all, I created environment "mytoolbox" by : mytoolbox <- new.env(parent=baseenv()) Is there anyway I put it in the search path ? If you need some background : In a project, I often write some small functions, and load them into...

question, minimize quadratic form
Sai Tong · Sep 19, 2011 · r-help

I have a question about what is the best function or package to use to do the following in R: minimize Q = g W g' where respect to \gamma where g is n x 1 vector, W is a n...

How to import data as numeric array?
tong wang · Jun 28, 2005 · r-help

Did some search but couldn't find useful result. I am trying to read a n*m dimension data with read.table, what i need is a numeric array, is there any efficient way to allow me get this array...

Debug with set.seed()
Tong Wang · Jun 1, 2007 · r-devel

HI, all I am debugging an R code with dynamically loaded function in it. It seems set.seed(n) does not give me the same random draws every time. Could somebody tell me what I should do to get the...

Can't find what you're looking for? Try searching with Google .