ite sure what the correct way
to do it would be? Hopefully, I would get the fit using the image way and see
that the fits are consistent.
Thank you again for your help!
Kind regards,
Greg
On Apr 16, 2011, at 4:46 AM, Rolf Turner wrote:
> On 16/04/11 15:50, Gregory Ryslik wrote:
>> Hi
Hi Everyone,
I am trying to figure out the spatstat package for the first time and am having
some trouble. Unfortunately, I can't post my data set but I'll hopefully post
enough details for some help.
I want to model the intensity of a spatial point process using 2 covariates
from my data. Aft
Hi,
I seem to be having somewhat of an unusual data input problem with some of the
data sets I'm working with and want to run a simulation on.
in the first data set I'm looking at, I have a text file where the spacing
between columns varies. I've attached a snippet. Is there a way to read this
wrong levels, turn it
> back into a character string vector first.
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Gregory Ryslik
> Sent: Thursday, 3 March 2011 1:46 PM
> To: r-help Help
> Subject:
Hi Everyone,
I'm running some simulations where eventually I need to table the results. The
problem is, that while most simulations I have at least one predicted outcome
for each of the six possible categories, sometimes the algorithm assigns all
the outcomes and one category is left out. Thus
Hi,
I have a fairly complex object that I have written a print function for.
Thus when I do print(results), the R console shows me a whole bunch of stuff
already formatted. What I want to do is to take whatever print(results) shows
to console and then put that in a file. I am doing this using t
, mylist), na.rm = TRUE)
> [1] 7.33 11.67 15.00 11.33 12.67 10.67 9.33
> 14.67 13.67
> [10] 10.00
> >
> > Reduce("+", mylist)/length(mylist)
> [1] 7.33 11.67 15.00 11.33 12.67 10.67 9.33
>
Hi Everyone,
I have a list of vectors like this (in this case it's 3 vectors but assume the
vector count and the length of each vector is not known):
[[1]]
[1] 9 5 7 2 14 4 4 3
[[2]]
[1] 3 6 25 2 14 3 3 4
[[3]]
[1] 28 4 14 3 14 2 4 5
What I want to do is take the average ver
Hi,
This might be me missing something painfully obvious but why does the cube root
of the following produce an NaN?
> (-4)^(1/3)
[1] NaN
>
As we can see:
> (-1.587401)^3
[1] -4
Thanks!
Greg
__
R-help@r-project.org mailing list
https://stat.ethz.c
;)))
On Oct 18, 2010, at 4:09 PM, jim holtman wrote:
> files did not make it through the mailer. How did you attach them?
> try outputting the data using 'dput' and then attaching a '.txt' file,
> or just pasting them in the email.
>
> On Mon, Oct 18,
>
> mapply(function(x1,x2)x1[[x2]],all.predicted.values,max.growth)
>
> might be what you want.
>
>
>
> On Oct 18, 2010, at 5:17 PM, Gregory Ryslik wrote:
>
>> Unfortunately, that gives me null everywhere. Here's the data I have for
>> all.pre
[3]]
[1] 0
[[4]]
[1] 0
[[5]]
NULL
[[6]]
[1] 0
[[7]]
[1] 0
[[8]]
[1] 0
[[9]]
NULL
On Oct 18, 2010, at 11:08 AM, Henrique Dallazuanna wrote:
> Try this:
>
> diag(sapply(all.predicted.values, '[[', 'max.growth'))
>
>
> On Mon, Oct 18, 2010 at 12:59 PM,
Hi,
I have a list of n items and the ith element has m_i elements within it.
I want to do something like:
predicted.values<- lapply(all.predicted.values,'[[',max.growth[[i]])
Where max.growth[[i]] is the element I want to extract from each of the ith
predicted elements. Thus, for example, I wa
Hi Everyone,
In follow up to my previous question, I wrote some code that correctly makes a
confusion matrix as I need it. However, it only works when the numbers are
between 1 and n. If the possible outcomes are between 0 and n, then I can't
reference row "0" of the matrix and the code breaks
8182 0.0909091 0.7272727
>
> In the above, the diagonal is the % correctly classified.
>
>> diag(1-prop.table(mat, 1))
> [1] 0.750 0.333 0.2727273
>
>
> TF
>
>
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-h
HI Everyone,
I am working with the following situation. I have n observations and j possible
outcomes and each one of the n observations is assigned a class from 1 to j.
Furthermore, this process is done m times (for some large m > 1000).
What I want to do is create a misclassification matrix
UC Berkeley
> spec...@stat.berkeley.edu
>
>
> On Thu, 30 Sep 2010, Gregory Ryslik wrote:
>
>> Hi,
>>
>> I have a list of of n elements (where n is unknown beforehand). Each element
>> of the list has two subelements.
Hi,
I have a list of of n elements (where n is unknown beforehand). Each element of
the list has two subelements. The first is a matrix, the second is a number. I
want to make a list of just the matrices.
I want to do something like mylists[[ ,2]] but that obviously doesn't work. Is
there a si
n you can take out the useNA = 'ifAny' in the apply line. Thanks everyone
and especially Henrique for all your help!
Kind regards,
Greg
Begin forwarded message:
> From: Gregory Ryslik
> Date: September 21, 2010 4:08:33 PM EDT
> To: Henrique Dallazuanna
> Cc: r-h...@stat
}
answer <- apply(array(unlist(mymats), dim = c(dim(mymats[[1]]),
length(mymats))), 1:2, mode)
On Sep 21, 2010, at 3:27 PM, Henrique Dallazuanna wrote:
> Use this function:
>
> mode <- function(x, ...)
> as.numeric(names(which.max(table(x, useNA = 'ifany'
Perfect! Thank you!
On Sep 21, 2010, at 3:27 PM, Henrique Dallazuanna wrote:
> Use this function:
>
> mode <- function(x, ...)
> as.numeric(names(which.max(table(x, useNA = 'ifany'
>
> On Tue, Sep 21, 2010 at 4:18 PM, Gregory Ryslik wrote:
> Hi,
&g
(unlist(mymats), dim = c(dim(mymats[[1]]), length(mymats))), 1:2,
> mode)
>
> The error was in c(length(mymats), dim(mymats[[1]]))
>
> On Tue, Sep 21, 2010 at 3:19 PM, Gregory Ryslik wrote:
> Ack, apologies for the previous email. What I meant to say is that the first
> ele
mode <- function(x, ...)
> as.numeric(names(which.max(table(x
> apply(array(unlist(mymats), dim = c(length(mymats), dim(mymats[[1]]))), 1:2,
> mode)
>
>
> On Tue, Sep 21, 2010 at 10:47 AM, Gregory Ryslik wrote:
> Hi Everyone,
>
> I am interested in takin
m = c(length(mymats), dim(mymats[[1]]))), 1:2,
mode)
On Sep 21, 2010, at 10:08 AM, Henrique Dallazuanna wrote:
> Try this:
>
> mode <- function(x, ...)
> as.numeric(names(which.max(table(x))))
> apply(array(unlist(mymats), dim = c(length(mymats), dim(mymats[[1]]))), 1:2,
> mo
Hi Everyone,
I am interested in taking the mode over several thousand matrices. I show an
example below. For the [1,1] entry of my "mode" matrix that I want to create I
would like to have a "2". For the [1,2] entry I would want a 2. For the [2,2]
entry it would be 4 and so forth. Earlier, I wa
> On Sep 20, 2010, at 10:28 PM, David Winsemius wrote:
>
>>
>> On Sep 20, 2010, at 10:12 PM, Gregory Ryslik wrote:
>>
>>> Hi,
>>>
>>> I have a list of 5 main elements where each main element has 247 atomic
>>> entries either 0
, 2010, at 10:28 PM, David Winsemius wrote:
>
> On Sep 20, 2010, at 10:12 PM, Gregory Ryslik wrote:
>
>> Hi,
>>
>> I have a list of 5 main elements where each main element has 247 atomic
>> entries either 0 or 1. I need to get this into a 247x5 matrix s
Hi,
I have a list of 5 main elements where each main element has 247 atomic entries
either 0 or 1. I need to get this into a 247x5 matrix so I do "do.call(cbind,
mylist)". However, it renumbers 0 to a 1 and the 1 to a 2 so that my matrix is
filled with 1's and 2's.
I understand I can fix it
nd regards,
Greg
Sent via BlackBerry by AT&T
-Original Message-
From: Uwe Ligges
Date: Wed, 15 Sep 2010 10:56:54
To: Gregory Ryslik
Cc:
Subject: Re: [R] multiple cores/building fails
On 14.09.2010 21:50, Gregory Ryslik wrote:
> Hi Everyone,
>
> I have written debugged an
Hi Everyone,
I have written debugged and tested my code and it works (yay!). I recently
tried to parallelize it (1 core/per tree) and when I run the code I get an
error saying the object "control" was not found. I do have an object control in
my code but it always works fine as long as I am not
te:
> You can try this also:
>
> Reduce('+', lapply(mymats, function(x)replace(x, is.na(x), 0)))
>
>
> On Sun, Sep 12, 2010 at 10:36 PM, Gregory Ryslik wrote:
>
> > Hi Everyone,
> >
> > Thanks to everyone for their help. With your suggestions a
Hi Everyone,
Thanks to everyone for their help. With your suggestions and some poking
around, the following works for what I need. It basically adds all the matrices
elementwise, and adds nothing if the element is NA. Thanks again! Code below:
**
mymats <- vector('l
m elementwise
> Reduce('+', mymats)
> [,1] [,2] [,3]
> [1,] 23 33 15
> [2,] 25 36 26
> [3,] 20 24 23
>
> HTH,
> Dennis
>
> On Sun, Sep 12, 2010 at 12:52 PM, Gregory Ryslik wrote:
> Hi,
>
> Doing that I get the following:
>
ose your list is called "mymats". Then
>
> Reduce("+",mymats)
>
> does what you want.
> - Phil
>
>
> On Sun, 12 Sep 2010, Gregory Ryslik wrote:
>
>> Hi,
>>
>> I have a list of several hundred 2 dimensi
Sorry, I forgot to add that some of the entries in various matrices have NA in
them.
On Sep 12, 2010, at 3:40 PM, Gregory Ryslik wrote:
> Hi,
>
> I have a list of several hundred 2 dimensional matrices, where each matrix is
> n x m. What I need to do is that for each n,m I nee
Hi,
I have a list of several hundred 2 dimensional matrices, where each matrix is n
x m. What I need to do is that for each n,m I need an average over all the
lists. This would collapse it down to just one nxm matrix. Any easy ways to do
that? As always, I'd like to avoid a for loop to keep co
gt; ### 8< cut here 8< ###
>
>
> (The sorting is not necessary. It's only there to make checking what
> happened easier.)
>
>
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Grego
Hi,
Suppose I have array A with 100 elements all filled in with "N/A". Array
B has 25 elements with actual values. Lastly, I have array C that
provides a map of where to put the elements from array A into array B.
Thus C would say put element 1 from B into element 3 from array A.
I realize
Hi Everyone,
I am implementing a special case of Random forests. At one point, I have a list
of which I then sample for replacement. So if the list is 100 elements, I get
100 elements some of them duplicates. How can I easily get the elements that
were not included in the list? I realize i can
39 matches
Mail list logo