Displaying 20 results from an estimated 1000 matches similar to: "Calculating mean together with split"
2006 Sep 21
1
transforming factor back to numbers
Hi
I generate a new dataframe by doing:
npl.agg <- aggregate(npl$DensPlants, list(year=npl$year, sim=npl$sim),
mean, na.rm=TRUE )
Now I want to plot it by using
coplot(npl.agg$x ~ npl.agg$year | npl.agg$sim, type="l")
but, as npl.agg$year is seen as a factor, the order of the points on the
x-axis (time axis) does not follow the numerical sorting 1...100, but
rather the text
2005 Oct 10
3
Vectorizing loop
Hi
I have the following loop and would like to vectorize it. Any ideas if
it is possible?
Thanks,
Rainer
Tha Loop:
for (i in 2:Result$NoSims)
{
ppp <- runifpoint(Result$NoPlants)
K <- Kest(ppp)
Result$LSim[i,] <- sqrt(K$iso / pi) - K$r
CM <- (Result$LSim[i,] * Result$LSim[i,]) / abs(K$r[2] - K$r[1])
Result$SigCM[i] <- sum(CM, na.rm=TRUE)
print(i)
flush.console()
}
2005 Oct 10
5
Show Progress in loop
Hi
I have a loop which is doing time consuming calculations and I would
like to be able to have some feedback on where it is in it's
calculations. I tried to simply show the counter variable in the loop,
but id doesn't work as all display seems to be delayed until the loop is
completed. Is there any way of displaying the progress of a loop?
Rainer
The loop:
for (i in
2006 Sep 06
4
problem with putting objects in list
Hi
I use the following code and it stores the results of density() in the
list dr:
dens <- function(run) { density( positions$X[positions$run==run], bw=3,
cut=-2 ) }
dr <- lapply(1:5, dens)
but the results are stored in dr[[i]] and not dr[i], i.e. plot(dr[[1]])
works, but plot([1]) doesn't.
Is there any way that I can store them in dr[i]?
Thanks a lot,
Rainer
--
Rainer M. Krug,
2006 Dec 01
2
specify point shape for ggplot (equivalent to pch)?
Hi
is it possible to specify the shape of the point to be used in ggplot
(as with pch in plot)? I couldn't find anything in the help.
Thanks
Rainer
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Department of Conservation Ecology and Entomology
University of Stellenbosch
Matieland 7602
South Africa
Tel: +27 - (0)72 808 2975 (w)
Fax: +27 - (0)86 516 2782
Fax:
2006 Sep 22
1
Update to Dillo browser question
Hi
I asked about if there is any way of opening URLs from the help browser
in the same window of the same dillo browser - here is the answer.
Just to reiterate: dillo is for me the perfect browser for the help of R
when you use ?...
Rainer
-------- Original Message --------
Subject: Re: [Dillo-dev] Opening new URL in same instance and -s option
Date: Thu, 21 Sep 2006 21:31:57 -0400
From:
2006 Sep 20
5
Beginners manual for emacs and ess
Hi
I heard so much about Emacs and ESS that I decided to try it out - but I
am stuck at the beginning.
Is there anywhere a beginners manual for Emacs & ESS to be used with R?
even M-x S tells me it can't start S-Plus - obviously - but I want it to
start R...
Any help welcome (otherwise I will be stuck with Eclipse and R)
Rainer
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc
2006 Oct 25
3
simplification of code using stamp?
Hi
I have the following code which I would like to simplify. Id does linear
regressions and returns the r-squares, and the coefficients.
It runs slow, as it is doing the regressions for each - is it possible
to get the values in a dataframe which looks as follow:
expert | xx | seeds | r.squared | slope | intercept
Thanks in advance,
Rainer
library(reshape)
rsqs <- as.data.frame(
2006 Nov 01
1
Compare linear regressios for significant differences of the slopes
Hi
I have (8 measures * 96 groups) = 768 datasets for which I did linear
regressions using lm().
Now I want to compare the slopes for each of the 8 measures in each of
the 96 groups. As I understand , I can not use
> anova(lm1, ..., lm8)
as the lm1 ... lm8 are based on different datasets.
I also read in previous discussions in this list, that I can see if the
slope +- stddev(slope)
2006 Aug 30
2
density() with from, to or cut and comparrison of density()
Hi
the function density() does normally integrate to one - I've checked it
and it works and I also read the previous threads.
But I realised that it does not integrate to one if I use from, to or cut.
My scenario: I simulated densities of a plants originating from an sseed
source at distance zero. Therefore the density of the plants will be
highest close to zero. Is there anything I can do
2006 Apr 28
2
fixme:imm:ImmReleaseContext message - what should I do?
Hi
When I run a program I've written with Delphi7, I get several of the
following messages:
fixme:imm:ImmReleaseContext (0x10020, 0x403b9e80): stub
.
.
.
The program works - but is there anything I can do to avoid these messages?
Rainer
--
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Department of Conservation Ecology and Entomology
University of Stellenbosch
2006 Dec 13
2
exporting a table to latex
Hi
I am using the latex() command from the Hmisc package to export table
to latex. For formating of the values, I use the format() function. But
I don't manage to get the format of the values right: I don't want
scientific notation, but if I say scientific=FALSE, I get many digits
after the decimal point which I can not control with digits=... and
nsmall=... in the format command.
2007 Jul 24
2
Winbind cache problem after upgrade to 3.0.25b.
Have just upgraded from 3.0.14a to 3.0.25b.
On starting winbindd it puts the following in /var/log/messages:
initialize_winbindd_cache: clearing cache and re-creating with version number 1
All the winbind UID/GID mappings are lost and it starts again from
scratch. Hence all file ownership / ACLs on this samba server become
invalid.
Anyone else seen this?
Why does it see fit to destroy this
2006 May 23
1
SmartInspect Personal crashes kwin under Wine 0.9.13
Hi
System:
SuSE 10.0
KDE Release 3.5.2 Level "a"
Wine 0.9.13
SmartInspect Personal 1.1.0.597
I installed SmartInspect Personal 1.1.0.597 under Wine 0.9.13 and it
works perfect. There is only on problem, but it doesn't influence the
usage - but when it happens, I have to logout (if still possible) and
logon again:
If I click on Help - About, the About window shows (it seems to be
2006 Nov 10
1
Combining factors
Hi
I know this is a basic question and I know I have done it before but I
can't find the answer any more.
I have a data set, say:
F1, F2, Value
F1 and F2 are Factors.
I would like to plot
plot(TheCombinationOf(F1, F2), Value)
I remember there was a function for TheCombinationOf() but I don't
remember the name.
I could create a new factor based on F1 and F2, but I would prefer the
2013 Feb 15
1
Remove site path from .libPaths
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I am sure I am missing something really basic, but I can't figure it out.
I want to start R so that I can specify the location for the Library tree. In principel simple:
As I only want it dependent on the directory I stat R in, I put a .Rprofile file in the directory.
My default path is:
> .libPaths()
[1]
2007 Sep 20
2
referencing packages?
Hi
I know how to referenc R in a scientific paper - but is there a
standardised way to reference packages?
Thanks
Rainer
--
NEW EMAIL ADDRESS AND ADDRESS:
Rainer.Krug at uct.ac.za
RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
2006 Jun 06
2
How to create list of objects?
Hi
I am doing several mle and want to store them in a list (or whatever is
the right construct) to be able to analyse them later.
at the moment I am doing:
f <- list()
f$IP <- mle(...)
f$NE <- mle(...)
but when I say:
> summary(f)
I get:
Length Class Mode
IP 0 mle list
NE 0 mle list
I don't get the output I would have, i.e. the one from
>
2007 Oct 01
4
Concatenating one character vector into one string
Hi
I am sure this is simple - but how can I convert one charecter vector
into one string?
example:
x <- c("This ", "is ", "one ", "sentence.")
should become
"This is one entence"
Thanks
Rainer
--
NEW EMAIL ADDRESS AND ADDRESS:
Rainer.Krug at uct.ac.za
RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH
Rainer M. Krug, Dipl. Phys.
2006 Dec 21
2
mongrel_service-0.3.1 problems - service will not start
Hey, I just finished a round of testing my app with mongrel-1.0rc1
(pretty good, four segfaults and a gc error in maybe ten thousands
requests) and was moving on to mongrel_service to see if it could cope
with said segfaults and gc errors. Sadly, the service will not start. I
installed using:
mongrel_rails service::install -N nplrails -e development -p 3000
claims to be happy. When I try to