[R] Print call condensely

2008-10-09 Thread Shengqiao Li
datasets methods base print.lm behaves simimarly. Is there any way to cat such a call wihtout the big space? Thanks a lot. Shengqiao Li __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read th

Re: [R] How to convert backslash to slash?

2008-09-24 Thread Shengqiao Li
ackslashes in memory. For instance: #not run now s<- `C:\Acer' print(s) [1] "C:\\Acer" On Wed, Sep 24, 2008 at 8:53 AM, Shengqiao Li <[EMAIL PROTECTED]> wrote: On Wed, 24 Sep 2008, Duncan Murdoch wrote: Shengqiao Li wrote: On Tue, 23 Sep 2008, Duncan Murdoch wrote

Re: [R] How to convert backslash to slash?

2008-09-24 Thread Shengqiao Li
On Wed, 24 Sep 2008, Duncan Murdoch wrote: Shengqiao Li wrote: On Tue, 23 Sep 2008, Duncan Murdoch wrote: On 23/09/2008 4:00 PM, Shengqiao Li wrote: How to use sub, gsub, etc. to replace "\" in a string to "/"? For example,convert "C:\foo\bar" to "C

Re: [R] How to convert backslash to slash?

2008-09-23 Thread Shengqiao Li
On Tue, 23 Sep 2008, Duncan Murdoch wrote: On 23/09/2008 4:00 PM, Shengqiao Li wrote: How to use sub, gsub, etc. to replace "\" in a string to "/"? For example,convert "C:\foo\bar" to "C:/foo/bar". If those are R strings, there are no backslashes i

[R] How to convert backslash to slash?

2008-09-23 Thread Shengqiao Li
How to use sub, gsub, etc. to replace "\" in a string to "/"? For example,convert "C:\foo\bar" to "C:/foo/bar". Thanks, Shengqiao Li __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] How to do knn regression?

2008-09-19 Thread Shengqiao Li
Date: Fri, 19 Sep 2008 07:00:33 + (UTC) From: "Hans W. Borchers" <[EMAIL PROTECTED]> Subject: Re: [R] How to do knn regression? To: [EMAIL PROTECTED] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=us-ascii Shengqiao Li stat.wvu.edu> write

[R] How to do knn regression?

2008-09-18 Thread Shengqiao Li
use band width to define neighborhood size. This contrasts to knn's variable band width via fixing a k. Are there any such functions I can use in R packages? Your help is highly appreciated. Shengqiao Li __ R-help@r-project.org mailing li

Re: [R] Wichmann-Hill Random Number Generator and the Birthday Problem

2008-08-19 Thread Shengqiao Li
upplied uniform generators return 32-bit integer values that are converted to doubles, so they take at most 2^32 distinct values and long runs will return duplicated values." Shengqiao Li -- O__ Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of

Re: [R] Wichmann-Hill Random Number Generator and the Birthday Problem

2008-08-19 Thread Shengqiao Li
ence is not satisfied. Yet again, you are trying to do things that any good text on simulation would warn you against, and which (in a thread on R-devel) you have already been told a good way to do. On Sun, 17 Aug 2008, Shengqiao Li wrote: On Sun, 17 Aug 2008, Duncan Murdoch wrote: Sh

Re: [R] Wichmann-Hill Random Number Generator and the Birthday Problem

2008-08-17 Thread Shengqiao Li
On Sun, 17 Aug 2008, Duncan Murdoch wrote: Shengqiao Li wrote: Dear all, Recently I am generating large random samples (10M) and any duplicated numbers are not desired. We tried several RNGs in R and found Wichmann-Hill did not produce duplications. The duplication problem is the

[R] Wichmann-Hill Random Number Generator and the Birthday Problem

2008-08-16 Thread Shengqiao Li
ts, duplications were surprisingly not observed. It seems that Wichmann-Hill has a much larger cycle than the one documented! Anybody can solve this puzzle? Regards, Shengqiao Li Department of Statistics West Virgina Unversity ==Testing=== RNGkind(kind="Knu

Re: [R] RNG Cycle and Duplication

2008-08-14 Thread Shengqiao Li
lues. You may not get the exact numbers, but they should be close. So how to explain above problem? I need generate a large sample without any ties, it seems to me "Wichmann-Hill" is only choice right now. Shengqiao Li The Departm

[R] RNG Cycle and Duplication

2008-08-14 Thread Shengqiao Li
length of 2^32. So, anybody can explain this? And any improvement to the implementation can be made to increase the cycle length like the Wichmann-Hill method? ======== Shengqiao Li Research Associate The Department of Statistics West Virginia University Morga