Displaying 20 results from an estimated 5000 matches similar to: "Aggregate?"
2006 Dec 01
3
Vertical line in densityplot?
Hi all,
I'm trying to get a vertical line at a specific point in a
densityplot. abline seems to be what's required, but it doesn't align
itself to the scale used in the plot.
example:
library(lattice)
x<-rnorm(100)
plot.new()
densityplot(x)
abline(v=0)
-----
The line seems to use some other coordinate system. What kind of call
do I use to make abline use the graph's
2006 Nov 21
1
strange R GUI crash
Hi all,
I know I shouldn't really expect the following to work, but it
provokes a crash of the GUI on my computer (Win xp professional).
---
>sessionInfo()
Version 2.3.1 (2006-06-01)
i386-pc-mingw32
attached base packages:
[1] "methods" "stats" "graphics" "grDevices" "utils" "datasets"
[7] "base"
2009 Jan 16
2
data frames with å, ä, and ö (=non-ASCII-characters) from windows to mac os x
Hi,
I ran into this issue previously and managed to solve it, but I've
forgotten how and am getting frustrated...
I have a data frame (see below) with scandinavian characters in R
(2.7.1) running on a Win Xp-computer. I save the data frame in an
RData-file on a usb stick, and load() it in R (2.8.0) running on OS X
10.5. Now the name of the data frame and all factor labels with
scandinavian
2010 Jun 22
1
New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())
On Thu, Jun 10, 2010 at 3:39 PM, Gustaf Rydevik
<gustaf.rydevik at gmail.com> wrote:
> Hi all,
>
> The recent change in 2.11 that made as.numeric() return false on
> difftime-objects broke some of my code that calculated age classes of
> individuals using cut(). While this was no big thing to fix for me, it
> might be wise
> to provide a cut.difftime method to ?stop
2010 Jun 22
1
New errors with difftime()-objects in 2.11.1 (was Re: Request: difftime method for cut())
On Thu, Jun 10, 2010 at 3:39 PM, Gustaf Rydevik
<gustaf.rydevik at gmail.com> wrote:
> Hi all,
>
> The recent change in 2.11 that made as.numeric() return false on
> difftime-objects broke some of my code that calculated age classes of
> individuals using cut(). While this was no big thing to fix for me, it
> might be wise
> to provide a cut.difftime method to ?stop
2007 Oct 10
2
download.file not working
Hi all,
I'm trying to download a file from the net, and the download.file
command leaves it corrupted, i.e excel cannot open it. It seems as if
it's going ok, however.
Does anyone have an idea of what's going on?
regards,
Gustaf Rydevik
----
>download.file(url="http://www.who.int/entity/whosis/whostat2006_demographics.xls",destfile="whodem.xls")
trying URL
2007 Jul 13
2
The "$" operator and vectors
Hi all,
I've run into a slightly illogical (to me) behaviour with the "$"
subsetting function.
consider:
> Test
A B
1 1 Q
2 2 R
> Test$A
[1] 1 2
> vector<-"A"
> Test$vector
NULL
> Test$"A"
[1] 1 2
> Test[,vector]
[1] 1 2
Is there a reason for the $ operator not evaluating the vector before executing?
best,
Gustaf
--
Gustaf
2010 Jun 03
2
moving average on irregular time series
Hi all,
I wonder if there is any way to calculate a moving average on an
irregular time series, or use the rollapply function in zoo?
I have a set of dates where I want to check if there has been an event
14 days prior to each time point in order to mark these timepoints for
removal, and can't figure out a good way to do it.
Many thanks in advance!
Gustaf
Example data:
2008 Apr 08
1
Change the position of panel strips in a lattice plot.
Hi all,
In lattice plots, is there any option to position the panel strips
with text below each subgraph, instead of above?
i.e. in:
Depth <- equal.count(quakes$depth, number=8, overlap=.1)
xyplot(lat ~ long | Depth, data = quakes)
,is there any way to make "Depth" appear below the subgraphs, instead of above?
I've been looking through the lattice documentation and the list
2008 May 23
2
Preparing high quality figures with tiff as end result
Hi all,
I'm currently preparing some figures that will be submitted to PloS One.
In their guidelines they state that they will only accept figures in
tiff or eps format, with the warning that eps figures will be
converted to tiff format ( see
http://www.plosone.org/static/figureGuidelines.action ).
Because of this conversion, I figured I'd generate tiff-format figures
from the beginning.
2009 Jan 20
1
two-sample test of multinomial proportion
Hi all,
This is perhaps more a statistics question than an R question, but I
hope it's OK anyhow.
I have some data (see below) with the number of tests positive to
subtype H1 of a virus, the number of tests postive to subtype H3, and
the total number of tests. This is for two different groups, and the
two subtypes are mutually exclusive.
What is the best way to test if the proportion of H1
2008 Oct 07
1
FW: Reading Data
Rahul Agarwal
Analyst
Equities Quantitative Research
UBS_ISC, Hyderabad
On Net: 19 533 6363
hi let me explain you the problem
we have a database which is in this format
Stocks 30-Jan-08 28-Feb-08 31-Mar-08 30-Apr-08
a 1.00 3.00 7.00 3.00
b 2.00 4.00 4.00 7.00
c 3.00 8.00 655.00 3.00
d 4.00 23.00 4.00 5.00
e 5.00 78.00 6.00 5.00
and we have a query
2007 Sep 14
3
x-axis order
Hi all,
I have a time series which contain data collected weekly from week 26
to week 25 the following year. How do I plot this data, so that the
x-axis is displaying the week numbers, ordered as in the data?
Thanks in advance,
Gustaf
---
x<-c(26:52,1:25)
y<-rnorm(52)+1:52
plot(x,y) ## How do I get the x axis to be ordered by the current
ordering of x?
--
Gustaf Rydevik, M.Sci.
tel:
2008 Jan 09
7
An "R is slow"-article
Hi all,
Reading the wikipedia page on R, I stumbled across the following:
http://fluff.info/blog/arch/00000172.htm
It does seem interesting that the C execution is that much slower from
R than from a native C program. Could any of the more technically
knowledgeable people explain why this is so?
The author also have some thought-provoking opinions on R being
no-good and that you should write
2009 Dec 28
2
WHO Anthro growth curve macros and R
Hi all,
I've got a project where I have to calculate weight-for-age Z-scores,
preferably using the WHO standards.
WHO have been very nice to publish macros for doing this in both
STATA,SPSS, SAS and Splus formats
(see http://www.who.int/childgrowth/software/en/), but for some reason
have chosen not to use the free R alternative to Splus.
In the Splus zipfile there are nine datafiles with a
2008 Dec 11
3
getting ISO week
Hi all,
Is there a simple function already implemented for getting the ISO
weeks of a Date object?
I couldn't find one, and so wrote my own function to do it, but would
appreciate a pointer to the "default" way. If a function is not yet
implemented, could the code below be of interest to submit to CRAN?
Best Regards,
Gustaf
--------------------
2010 May 02
2
Set encoding when load()-ing workspaces?
Hi all,
I hope that there is someone that can help me out here.
I am trying to load() a workspace on os x (R 2.11.0) that was saved in
windows XP (R 2.9). In that workspace, there's a data.frame with names
that contain swedish characters. These characters become garbled,
which is a major problem.
>From the R windows FAQ, I read:
"Note though that character data in a workspace will be
2012 Nov 11
2
Djjlölkjhfyn kb noknkkkkokljjyikkk hyjjjjjkjjjjkjkkpooololåååååååååååååååääääkkuiivjkoööklopipållällnbbbn mml ömmmm
M
P?opklpnlbyj?nvnmm
M. ?plppkbkv??k? knbnnnnnn??????llp?????tx hikkkhgxxx vj jul?l
Sent from my iPhonejukuj?b?mjl jnmnmmm
Sorry for keeping things short
Gustaf Granath (phd)
Plant Ecology
Uppsala University
2009 Jan 14
1
reshape, direction=long: "multiple row names not allowed"
Hi all,
for some reason I always get stuck spending hours when trying to use
reshape or the Reshape package. Heaven knows why.
My latest frustration (in 2.7.1, so ignore if this has been fixed):
test<-data.frame(matrix(rnorm(42*4),ncol=4),rep(1:21,2),rep(c("a","b"),each=21))
reshape(test,varying=list(colnames(test)[1:4]),direction="long")
2009 Apr 15
1
"utils" lacking namespace?
Hi all,
A colleague of mine tried to install the package EMV, which had been
removed from CRAN.
she ran into some kind of trouble, R locked up, and she closed the program.
Now when she starts R, "utils" can't be loaded which of course create
an unworkable environment.
Below I've copy-pasted the error message she gets when starting R.
Any ideas on what went wrong, and more