search for: hongwei

Displaying 20 results from an estimated 39 matches for "hongwei".

2009 Nov 27
2
set condition in R
Hi, R users, I'm using while() in R to set a condition. My condition is: i<523 or i>535. How should I write this in R? I try "while (i<523 or i>535)" and it does not work. Thanks. Garry On Tue, Nov 10, 2009 at 11:26 AM, Hongwei Dong <pdxdong@gmail.com> wrote: > Exactly! Thanks, Duncan. > > Let me re-phrase me question like this: > > 1) X_i values are independent Gammas, with the shape 0.067 and scale 0.008 > 2) Min(X)=1 and Max(X)=85 > 3) SUM(X)=2000 > 4) Do I also have to define the number...
2010 Jan 20
2
Question about many-to-one merge
...1 100 2 3 130 3 1 100 3 2 150 The Merge command doesn't work well. I also don't want to use for loop. I feel that there must be some subscripting or other tricks to use, but I couldn't figure it out. Any help is appreciated!! -Hongwei -- View this message in context: http://n4.nabble.com/Question-about-many-to-one-merge-tp1018811p1018811.html Sent from the R help mailing list archive at Nabble.com.
2011 Feb 22
5
"aggregate" in R
Hi, R users, I'm wondering how I can aggregate data in R with different functions for different columns. For example: x<-rep(1:5,3) y<-cbind(x,a=1:15,b=21:35) y<-data.frame(y) I want to aggregate "a" and "b" in y by "x". With "a", I want to use function "mean"; with "b", I want to use function "sum". I tried:
2002 Oct 15
3
Share names causing big troubles
I work for a school dist, and I am having a bit of trouble with the "Student Server" We have about 3000 students all with their own accounts. I had the samba server setup to share their home directories but their home directories are the same as their login name. So jamie.mcparland would be an example of a share name. But in Win 9X it gets truncated to jamie.mcparla then we get the error
2015 Jan 27
2
[LLVMdev] ATS workaround for Clang 3.5
...fortunately, with 3.5, moving from -O1 to -O2 triggers a crash on startup in the clang-generated executable. I had suggested building with -fsanitize=undefined and -fsanitize=address to weed out any dependencies undefined behavior. All their generated C code came out clean. Here is the workaround Hongwei Xi came up with: https://github.com/githwxi/ATS-Postiats/commit/5e17db4badf58b404598e8b3ae4a666b8b0e889c Looks like a bug on the LLVM side. He says it worked with clang 3.3, but breaks on 3.4 and 3.5. Would someone be interested in investigating this further? It's fallen down to an area I...
2011 Feb 22
4
identify an element in a column
Hi, R users, I'm wondering if I can identify an element in a column by an element in another column. For example: x<-1:10 y<-11:20 z<-cbind(x,y) z x y [1,] 1 11 [2,] 2 12 [3,] 3 13 [4,] 4 14 [5,] 5 15 [6,] 6 16 [7,] 7 17 [8,] 8 18 [9,] 9 19 [10,] 10 20 What I want to do is: when x=5, y=y-1 Anyone can tell me how to do this? Thanks. Gary [[alternative
2002 Jun 11
2
Strange problem with samba
...go to any windows, I cannot connect to the samba server. If I go to the DOS prompt, and type net use x: \\morpheus\common it asks me Type the password for \\morpheus\common Then, it always says Login failed. Unknown username or bad password. Could you give me some help? Thanks a lot! Hongwei Li --------------------------------------------------------- This message sent using EMUmail -- http://www.emumail.com --------------------------------------------------------- Jumping through hoops to get E-mail on the road? You've got two choices: Join the circus, or use MollyMail. Moll...
2010 Oct 16
3
reduce the size of points in plot???
Hi, R users, Can anyone tell me how I can change the size of points in my plot? For example: x <- c(1,3,6,9,12) y <- c(1.5,2,7,8,15) plot(x,y,pch=20) How do I reduce the size of those points? Thanks. Gary [[alternative HTML version deleted]]
1999 Apr 23
0
SAMBA digest 2065
...heus Samba 1.9.17p4 Share name Type Used as Comment -------------------------------------------------------------------------------- common Disk Public partition homes Disk Home directories hongwei Disk H: Home directories hp4n Print lp lab1disk Disk Lab1 The command completed successfully. On 95s: c:\> net view \\morpheus Shared resources at \\MORPHEUS Sharena...
2010 Mar 24
1
with data in the form of an R data objecte: Monte Carlo simulation in R
Hi, please use the following the matrix z as the example: x<-c(2,4,5,7,6,9,8,2,0) y<-matrix(x,3,3) z<-apply(y,2,function(x)x/sum(x)) z On Tue, Mar 23, 2010 at 6:59 PM, David Winsemius <dwinsemius@comcast.net>wrote: > > On Mar 23, 2010, at 9:05 PM, Hongwei Dong wrote: > > Hi, R-helpers, >> >> I'm trying to use R to do a Monte Carlo simulation and need the help. What >> I >> have is a matrix that consists of the probabilities for the persons to >> choose zones. For example, in the matrix shown below, each colum...
2009 Nov 10
1
Generate Random Draw from Gamma Distribution Re: Monte Carlo Simulation in R...
...lso have to define the number of draws? if yes, it could be 250. Based on these restrictions, I want to generate random draw. I'm wondering how I can do this in R. Thanks. Garry On Tue, Nov 10, 2009 at 11:17 AM, Duncan Murdoch <murdoch@stats.uwo.ca>wrote: > On 11/10/2009 1:25 PM, Hongwei Dong wrote: > >> Hi, Dear R users, >> >> I'm wondering if I can do Monte Carlo Simulation in R. My problem is like >> this: I know variable X follows Gamma distribution with shape parameter >> 0.067 and scale parameter 0.008. The sum of the X is 2000. I need R h...
2009 Jul 23
3
how to predict dynamic model in R
I have a dynamic time series model like this: dyn$lm( y ~ lag(y,-1) + x + lag(x,-1)+lag(x,-2) ) I need to do an out of sample forecast with this model. Is there any way I can do this with R? It would be greatly appreciated if some one can give me an example. Thanks. Harry [[alternative HTML version deleted]]
2009 Nov 09
3
How to transform the Matrix into the way I want it ???
Hi, R users, I'm trying to transform a matrix A into B (see below). Anyone knows how to do it in R? Thanks. Matrix A (zone to zone travel time) zone z1 z2 z3 z1 0 2.9 4.3 z2 2.9 0 2.5 z3 4.3 2.5 0 B: from to time z1 z1 0 z1 z2 2.9 z1 z3 4.3 z2 z1 2.9 z2 z2 0 z2 z3 2.5 z3 z1 4.3 z3 z2 2.5 z3 z3 0 The real matrix I have is much larger, with more than 2000 zones. But I think it should
1999 Apr 27
1
An even more strange win95 browsing problem
...tem on 95-2, I got the same result as I got on 95-1, i.e. the correct result. That is probably why 95-2 users can not see the Linux box, but can see AIX shares. I reboot the machines (Linux, win 95), restart samba, etc., but no difference. Can somebody give me any clue? I appreciate all help! Hongwei Li
2009 Jun 29
2
How to use "subset" in lm function
Hi, I'm using R to do a time series analysis. In the model, I use the lags of some variables. such the lags of the variables have different length, I just can't use them directly in the lm function. Intuitively, I feel that "subset" might be useful, but I do not know how to use it. Anyone can give me an example syntax? Thanks. Harry [[alternative HTML version deleted]]
1999 Jul 15
0
samba-2.0.2 compile error
When the world was young, Hongwei Li <hongwei@morpheus.wustl.edu> carved some runes like this: > I try to compile samba-2.0.2 on a linux box (RedHat 6.0). The command > /configure did not show any error. Then, when I run make, most parts are > okay until near the end: > > Compiling printing/printing.c &g...
2009 Jul 02
2
Plot two graphs with different ranges in one
Hi, I'm trying to plot two variables in one graph. One ranges between 0 and 1, while the other ranges between 50 and 500. Can I plot them in one graph with similar scale? Thanks Harry [[alternative HTML version deleted]]
2009 Aug 03
2
What does this error message mean?
Hi, I used R to run a linear regression and keep getting the following error message. I do not understand it very well. Anyone can help out? Thanks. Error in storage.mode(y) <- "double" : invalid to change the storage mode of a factor In addition: Warning message: In model.response(mf, "numeric") : using type="numeric" with a factor response will be ignored
2009 Aug 17
2
memory limit in R
Hi, all, I'm doing a discrete choice model in R and kept getting this error: Error: cannot allocate vector of size 198.6 Mb. Does this mean the memory limit in R has been reached? > memory.size() [1] 1326.89 > memory.size(TRUE) [1] 1336 > memory.limit() [1] 1535 My laptop has a 4G memory with Windows Vista (32 bit). I increased the memory limit to 2500 M. But still getting the same
1997 Jul 25
2
CD rom / linux
hongwei@morpheus.wustl.edu said : >I have a question about cd-rom for linux system. Although it is not >related to samba directly, I believe many people in this group are >expert about linux and may give me correct answer. I am going to >buy a pc to install linux (the most recent slackware...