ta<- data.frame(y,x,a,b,c)
mod1<- lmer(y ~ x + (1|a:b) + (1|b:c), data=mydata)
mod2.lme<- lme(y ~ x, random=list(a=~1, b=~1, c=~1), data=mydata)
mod2.lmer<- lmer(y ~ x + (1|a) + (1|a:b) + (1|a:b:c), data=mydata)
My objective is to specify mod1 using function lme.
Anyone knows how
Dear list,
I am trying to fit some mixed models using packages lme4 and nlme.
I did the model selection using lmer but I suspect that I may have some
autocorrelation going on in my data so I would like to have a look using the
handy correlation structures available in nlme.
The problem is th
Many thanks for your help!
Thanks to you guys I manage to solve my problem in an efficient way
All the best
J
On Tue, Oct 26, 2010 at 11:04 PM, Remko Duursma wrote:
>
> I don't know why I forgot that you can do this as well :
>
> area.poly(intersect(p1,p2))
>
> ... a bit more straightforward.
>
Thanks for your reply,
My main issue is that I don't have any equations to generate the data, just
a bunch of points, each corresponding to a polygon.
I was looking in package "sp" and there is a function to calculate areas (
areapl()), but not for intersecting polygons. Is there any other packag
Dear list:
I am trying to calculate the intersection area between two irregular
polygons (see example data below).
set.seed(1234)
theta <- seq(0, 2 * pi, length=(100))
poly1<- cbind(c(0 + 1 * cos(theta) + rnorm(100, sd=0.1)), c(0 + 2 *
sin(theta)))
poly2<- cbind(c(0 + 2 * cos(theta) ), c
Dear list:
I have a dataset of geographical data that looks like this example data:
dat<- data.frame( lon = c(rnorm(1000, mean=-10), rnorm(1000, mean=10),
rnorm(1000, mean=5)),
lat = c(rnorm(1000, mean=40), rnorm(1000, mean=30), rnorm(1000, mean=0)))
plot(dat$lon, dat$lat)
My positions are cl
gt;> On 04/03/2010 10:32 PM, David Winsemius wrote:
>>>
>>>> On Mar 4, 2010, at 9:47 PM, jonas garcia wrote:
>>>>
>>>>> When I opened the file with a hex-editor, the problematic character
>>>>> turned out to be 1a
>>&
e in a binary/raw, finding the
> offending character and replacing it with a blank (or whatever and
> then writing the file back out). You can then probably process it
> using read.table.;
>
> On Thu, Mar 4, 2010 at 12:50 PM, jonas garcia
> wrote:
> > Thank you so much for your rep
go for text editors
separately.
Help on this would be much appreciated.
Thanks again
J
On 3/4/10, David Winsemius wrote:
>
>
> On Mar 3, 2010, at 2:22 PM, jonas garcia wrote:
>
> Dear R users,
>>
>> I am trying to read a huge file in R. For some reason, only a
Dear R users,
I am trying to read a huge file in R. For some reason, only a part of the
file is read. When I further investigated, I found that in one of my
non-numeric columns, there is one odd character responsible for this, which
I reproduce bellow:
In case you cannot see it, it looks like a
e but with opposing
> orientation.
>
> Try fooling about with the mgp argument in axis():
>
> par(mfrow=c(1,1), cex.axis = 0.5, cex.lab = 0.5)
> plot(1,1, axes = F)
> axis(1, mgp=c(3,0.7,0))
> axis(2, mgp=c(3,1,0))
>
> >>> jonas garcia 10/13/09 5:58 PM >>>
&
Dear list,
why does the distance between the axis labels and the tick marks looks
different for x axis and y axis in the plot (see code below).
In fact, the x axis labels look furthest from the tickmarks than in the y
axis.
How can I make them look the same?
par(mfrow=c(1,1), cex.axis = 0.5, cex.
get, env=env))
> }
>
> testA()
>
> But more generally, I doubt your construct using assign and get is the most
> natural way to reach your goal in R.
>
> HTH,
>
> baptiste
>
>
> 2009/9/4 jonas garcia
>
>> Hi all,
>>
>>
>>
>> I ha
Hi all,
I have got 2 function (see bellow) which are simplifications of what I need
to do. These functions are precisely the same, except for the last line.
My question is, why doesn't function testA work in the same way as function
testB.
Both functions produce two objects, "a" and "b" that
Thanks Erik and Henrique,
That's what I was after.
Jonas
On Tue, Sep 1, 2009 at 8:08 PM, Henrique Dallazuanna wrote:
> Try this:
>
> > sapply(vec.names, get)
>
> But for this example, you don't need for, try:
>
> > dat - 1
>
> On Tue, Sep 1, 20
Dear list,
I have a character vector such vec.names<- c("a", "b")
It happens that I have also two R objects called "a" and "b" that I would
like to merge. Is it possible to
do something like cbind(vec.names[1], vec.names[2]) ending up with the same
result as cbind(a,b)
Bellow is a reproduci
Dear R users:
I have got a simple question that has been bothering me for a while.
Given a certain character vector, I would like to get in a separate vector a
fragment of text, in this case the 3rd and 4th letters of each element.
So, if:
v<- c(stratosphere, mesosphere, troposphere
; Behalf Of Tony Breyal
> Sent: Wednesday, December 10, 2008 1:01 PM
> To: r-help@r-project.org
> Subject: Re: [R] missing argument
>
> ?missing
>
> never used it myself, but looks like it might help you :-)
>
> Tony Breyal.
>
> On 10 Dec, 19:09, "jonas garcia&q
Dear list,
I have a question and I'm going to give an example of my problem
f<- function(d1, d2, d3)
{
d<- d1*d2/d3
return(d)
}
v1<- 1
v2<- 2
If I try
f(v1, v2, v3)
Error in f(v1, v2, v3) : object "v3" not found
I obviously got the above error message.
I would like to add something to my functio
Thank you all for the useful responses. Problem solved!
J
On Thu, Oct 23, 2008 at 12:14 AM, Duncan Murdoch <[EMAIL PROTECTED]>wrote:
> On 22/10/2008 5:02 PM, jonas garcia wrote:
>
>> Dear list:
>>
>>
>>
>> I have the following problem: From a vector
Dear list:
I have the following problem: From a vector like this:
vec<- c("mud_1999_area_A", "gravel_2004_area_F")
I would like to get the year in a separate vector, such
y<- c("1999", "2004")
I´ve been looking to grep() but I'm not sure how to do this.
Help?
Thanks in advance
J
21 matches
Mail list logo