Its not clear what your code is intended to do but
- put set.seed(123) before your code so you can
run it reproducibly.
- wave2 <- sort(abs(rnorm(100))) is the same as your first
two lines
- your findInterval line always returns 1 so its probably not what you want
- i in i:x is confusing. Use j
I solved it myself by reading the help files which i should have done prior to
my posting.
Solution:
wave2 <- abs(Re(rnorm(100)))
wave2 <- sort (wave2, decreasing=F)
hist(wave2)
x <- length (wave2)
i <- findInterval((wave2[1]), wave2)
i <- i+1
out <- numeric(x)
for (i in i:x) {
out[i] <- (wave
Yes, that works perfectly. Thank you for your help!
Derek
Charilaos Skiadas-3 wrote:
>
> Hi Derek,
> On Dec 23, 2007, at 10:59 PM, dxc13 wrote:
>
>>
>> useR's,
>>
>> I have used expand.grid() several times and like the results it
>> gives me. I
>> am now trying something with it that I h
Hi Derek,
On Dec 23, 2007, at 10:59 PM, dxc13 wrote:
>
> useR's,
>
> I have used expand.grid() several times and like the results it
> gives me. I
> am now trying something with it that I have not been able to get to
> work.
> For any n column matrix I would like to run this function on those
useR's,
I have used expand.grid() several times and like the results it gives me. I
am now trying something with it that I have not been able to get to work.
For any n column matrix I would like to run this function on those n columns
and store the results.
For example, if my matrix has 1 colum
On Dec 23, 2007, at 9:21 AM, Duncan Murdoch wrote:
> On 23/12/2007 9:15 AM, Duncan Murdoch wrote:
>> On 22/12/2007 5:45 PM, Charilaos Skiadas wrote:
>>> On Dec 22, 2007, at 4:44 PM, Duncan Murdoch wrote:
> 5) eval then creates the environment where this evaluation
> will take place. It
Hi all,
I am pretty new to R and even new to programming in general. Right now i get
only one value for
j below (print(j)), how do i save all j values to one vector or matrix? Sorry
for this very basic
question. thanks in advance.
wave2 <- abs(Re(rnorm(100)))
i <- findInterval((wave2[1]), wave
Jiaming Zuo <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]:
> I am working for the United Nations to construct a complete life
> table
> from an abridged table.
> I want to use the code of Hydman Filter by Rob J Hydman but an
> error
> sentence always appears and it simply
At 4:28 PM -0500 12/23/07, affy snp wrote:
>Hello list,
>
>I have a data frame M like:
>
>BAC chrpos s1 s2
>RP11-80G24177465510-10
>RP11-198H14178696291-10
>RP11-267M21179681704-10
>RP11-89A19 180950808-1
On Dec 23, 2007 4:28 PM, affy snp <[EMAIL PROTECTED]> wrote:
> Hello list,
>
> I have a data frame M like:
>
> BAC chrpos s1 s2
> RP11-80G24177465510-10
> RP11-198H14178696291-10
> RP11-267M21179681704-10
> RP11-89A19
Hello list,
I have a data frame M like:
BAC chrpos s1 s2
RP11-80G24177465510-10
RP11-198H14178696291-10
RP11-267M21179681704-10
RP11-89A19 180950808-10
RP11-6B16182255496-10
RP11-21
Dietrich Trenkler uni-osnabrueck.de> writes:
> Dear HelpeRs,
>
> a colleague of mine uses Scientific Workplace to write his LaTeX documents.
> I made his mouth water mentioning the advantages of using Sweave.
>
> Not using SW myself I wonder if anyone out there has gathered some
> experiences
>
Thanks to Jay Kerns and Jim Lemon for their help. It's exactly what I wanted
and "aggregate" is very efficient even with a huge data. Thanks
"G. Jay Kerns" <[EMAIL PROTECTED]> a écrit : Hi Louis,
If I am understanding your question correctly, here is one way:
suppose your matrix is M of dimensio
On 23/12/2007 9:15 AM, Duncan Murdoch wrote:
> On 22/12/2007 5:45 PM, Charilaos Skiadas wrote:
>> On Dec 22, 2007, at 4:44 PM, Duncan Murdoch wrote:
5) eval then creates the environment where this evaluation will
take place. It does that by creating an environment containing
the
On 22/12/2007 5:45 PM, Charilaos Skiadas wrote:
> On Dec 22, 2007, at 4:44 PM, Duncan Murdoch wrote:
>>> 5) eval then creates the environment where this evaluation will
>>> take place. It does that by creating an environment containing
>>> the frame "a=5", and with enclosing environment the p
Chris.H. Snow a écrit :
> How can I insert cross-references to odfWeave generated figures in my
> source odf before the graphic has been created with odfWeave?
In the current (0.6.0) version, you can't. I wrote some modifications to
odfWeave in this direction, planning to send them back to Max Kuh
i didn't test, but i think you want something like:
table(apply(x, 1, paste, collapse=","))
where "x" is your matrix...
b
On Dec 23, 2007, at 5:01 AM, Jim Lemon wrote:
Louis Martin wrote:
Hi,
I have a matrix of duplicate rows. How to output a list the unique
rows with their count? I have
Louis Martin wrote:
> Hi,
>
> I have a matrix of duplicate rows. How to output a list the unique rows with
> their count? I have used "unique" to have the unique rows, but can't produce
> the occurences of each unique row.
>
Hi Louis,
If you want the unique rows returned, this might do the job.
18 matches
Mail list logo