[R] Get bearing for cartesian coordinates

2009-07-27 Thread pecardoso
Is it possible to get bearing in degrees from Cartesian (not lat long) 
coordinates?


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Out of memory - RDGAL CPLRealloc()

2009-08-02 Thread pecardoso
I got this error message.

Error in .local(.Object, ...) : 
GDAL Error 2: CPLRealloc(): Out of memory allocating 16 bytes

I was trying to read 1388 jpg images (993x993) with rgdal in a loop, to store 
data in a data.frame. It fails to read the 1338 image.

Isn't R recycling the object?

I'm running this process in a Server machine with Win XP x64, Xeon processor, 
4GB Ram. R is running with default configurations.

Can I change memory allocation to increase storage capabilities or this 
specific error have nothing to do with this? 

[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] Formating numbers

2008-05-05 Thread pecardoso
Maybe a very, very basic question but how can I get a vector of values with the 
specific format:
001,002,010,100
 
instead of:
1,2,10,100
 
Paulo



De: [EMAIL PROTECTED] em nome de Stephan Moratti
Enviada: seg 05-05-2008 11:43
Para: r-help@r-project.org
Assunto: Re: [R] Validating a mixed-effects model



Hi Armin,

Alternatively you could use premutation statistics. You could shuffle
your subjects between groups randomly under the Null hypothesis of no
differences between groups and each time claculating the lme model. I am
not sure, but if you do it at each time point of your repetition at each
draw, then you could remember the greates F value for your F-value
distribution. This could control the multiple comparison problem. Then
after let's say 1000 draws you have a F value distribution under the
Null hypothesis and you could determine your critical F value from that
distribution.

Hope that helps,

Stephan


Armin wrote:

Hi

I constructed a mixed-effects model from longitudinal repeated
measurements of lab values in 22 patients seperated into two groups
with the groups as fixed effect using lme. I thought about using the
jackknife procedure, i. e., removing any one subject and calculating
the fixed effect, to assess the stability of the fixed effect and
thereby validate the model. I suppose this has been done in the
following study:

http://content.nejm.org/cgi/content/full/357/19/1903
(this may be restricted access, sorry)

Is such an approach feasible?

Also in the article results are confirmed by comparing the mixed model
with a fitted least-squares regression. I understand that this can be
achieved with lmlist, but only for for models without an additional
fixed effect!?

Are there any other good approaches to validate a mixed-effects model
that will be accepted in medical peer review?


--
*Stephan Moratti, PhD/
/**/see also: http://web.mac.com/smoratti/
/*Centro de Tecnología Biomédica CBT,
Universidad Politécnica de Madrid,

en la actualidad (currently at) en el
Centro de Magnetoencefalografía Dr. Perez Modrego,
Universidad Complutense de Madrid,
Faculdad de Medicina,
Pabellón 8,
Avda. Complutense, s/n,
28040 Madrid,
Spain,

email: [EMAIL PROTECTED] 
 [EMAIL PROTECTED]
Tel.:+34 91 394 2292
Fax.:   +34 91 394 2294
*/
/*

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


[R] add horizontal line "(ABLINE(V=))" to xyplot lattice

2008-05-13 Thread pecardoso
Hi,
In a lattice plot like this:
 
win.graph()
xyplot(tmx~frequ|as.factor(as.numeric(spf)),groups=as.factor(blm),data=tmx,type="l",pch=16,xlab="frequency
 (N)",ylab="Area held (ha)",
auto.key=list(blm,points=F,lines=T,title="Blm 
factor",cex.title=0.7,cex=0.7,corner=c(1,1)),main="Mangroves 
target=1573ha",layout=c(2,3))

I would like to add a horizontal line to each one of the 5 graphs with a single 
value, v=1573
 
Any idea will be welcome
 
Paulo



De: [EMAIL PROTECTED] em nome de Jim Lemon
Enviada: ter 13-05-2008 10:56
Para: [EMAIL PROTECTED]
Assunto: Re: [R] Random number generation



On Behalf Of Esmail Bonakdarian wrote:
 > ...
 > What I read doesn't seem to be incorrect however (it may even
 > have been an archived message here), the *language* itself
 > does not seem to support block *comments*. Using conditional
 > constructs, or an IDE/editor to achieve similar results is a
 > work around - but not the same. I don't mean to nitpick, but
 > as a computer scientist I see this as different :-)

For those using NEdit, the R block comment macro:

replace_in_selection("^","#","regex")

and the corresponding R block uncomment macro:

replace_in_selection("^#","","regex")

are both trivial. Just highlight the block and detonate the macro.

Jim

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] strip white in character strings

2008-05-14 Thread pecardoso
Maybe another basic question but...
 
Is is possible to accomodate more than a single (independent, not resulting 
from arranjment of layout=c()) lattice graph in a single win.graph() device?
Thanks in advance,
 
PS Maybe duplicated
 
Paulo



De: [EMAIL PROTECTED] em nome de Roland Rau
Enviada: qua 14-05-2008 17:06
Para: '[EMAIL PROTECTED]'
Assunto: [R] strip white in character strings



Dear all,

I have several datasets and I want to generate pdf plots from them.
I also want to generate automatically the names of the files. They are
country-specific and the element mycurrentdata[1,1] contains this
information.

So what I do is something like this:
pdf(file=paste(mycurrentdata[1,1], ".pdf", sep=""), width=...etc)

The only problem I have is that some of the country names contain white
space (e.g., "United Kingdom"). This is no problem for generating the
pdf plots but it may become problematic during further processing (e.g.
incl. the plots in LaTeX documents).

Is there an easy function to strip white space out of character strings
(similar to the strip.white=TRUE option in read.table/scan)?

I'd appreciate any kind of help and I hope I did not miss anything
completely obvious.

Thanks,
Roland

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.