Displaying 20 results from an estimated 1000 matches similar to: "query labels in iplot() (or other interactive scatterplot)"
2012 May 28
2
zoo: variable gets modified at making zoo object
I'm doing:
> alyL32007z <- zoo(alyL32007,alyL32007$time)
> range(time(alyL32007z))
[1] "2007-01-01 00:00:00 UTC" "2007-12-31 23:30:00 UTC"
But then, while the original variable is:
> summary(alyL32007$NEE_st)
Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
-15.340 -1.615 -0.054 -0.814 0.750 8.965 11124
the variable within the zoo object
2012 Jun 08
3
day of the year for chron objects
Hi!
Is not there an standard R function to retrieve the day of the year
(since 1st Jan of the same year)?
I know I can make my own using julian, but find it weird that having
days(), months() etc doy() does not exist as an standard function.
Also, is the following not a bit inconsistent?
> a <- chron("20100506",format="ymd")
> a
[1] 100506
> years(a)
[1] 2010
2012 May 29
1
problems with xlim in plot.zoo() and window()
I'm trying to get a minimally intuitive way of plotting zoo objects
extracted for given periods of time
I do:
> plot(alyL32007z$NEE_st,col=cod,type="b",pch=18,xlim=time(alyL32007z)[c(3000,15000)])
and get a correct plot but the expression for xlim is hard to read by humans.
I try
> time(alyL32007z)[c(3000,15000)]
[1] "2007-03-04 11:30:00 UTC" "2007-11-09
2011 Sep 16
1
cutree() and rect.hclust(): different labelling of classes
I've found that while cutree() and rect.hclust() make the same classes
for a given height in the dendrogram, the actual labeling of the classes
is different. For example, both produce the same 4 classes but
class 1 according to cutree() is class 4 according to rect.hclust().
Would it be possible that future versions provide the same labeling?
rect.hclust() is useful to display the classes
2011 Sep 27
2
Problem with zoo::window()
I have the following time series:
> class(CCasadesz2)
[1] "zoo"
> setmanes <- cut(time(CCasadesz2),breaks="weeks")
> CCasadeswz <- aggregate(CCasadesz2,sum,by=setmanes)
> class(CCasadeswz)
[1] "zoo"
> summary(CCasadeswz)
Index CCasadeswz
2009-01-12 00:00:00: 1 Min. : 4.0
2009-01-19 00:00:00: 1 1st Qu.:
2013 Feb 17
0
strptime() with format %OS does not print millisecs in MacOS
Hi!
I'm finding this on MacOS Lion 10.7.5
> getOption("digits.secs")
NULL
> a <- "2012_10_01_14_13_32.445"
> strptime(a,format="%Y_%M_%d_%H_%M_%OS")
[1] "2012-02-01 14:13:32"
> strptime(a,format="%Y_%M_%d_%H_%M_%OS3")
[1] NA
I can solve it with
> options(digits.secs=3)
> strptime(a,format="%Y_%M_%d_%H_%M_%OS")
2009 May 12
2
[Fwd: Re: ubuntu problem with 'r-cran-robustbase' [FWD Agustin Lobo]]
Subject: Re: [R-sig-Debian] ubuntu problem with 'r-cran-robustbase' [FWD
Agustin Lobo]
Date: Tue, 12 May 2009 13:30:49 +0200
From: Agustin Lobo <aloboaleu at gmail.com>
Reply-To: aloboaleu at gmail.com
To: Dirk Eddelbuettel <edd at debian.org>
CC: Martin Maechler <maechler at stat.math.ethz.ch>,
R-SIG-Debian at stat.math.ethz.ch
References: <18953.17704.527898.355877
2009 May 12
2
ubuntu problem with 'r-cran-robustbase' [FWD Agustin Lobo]
Agustin, posted on R-help.
I think the problem is one of the debian/ubuntu package
'r-cran-robustbase' and its setup or (missing?) dependencies.
I can confirm Agustin's problem, working on Ubuntu 8.04.2
(8.04 is a "LTS" = long time support version).
apt-get install r-cran-robustbase
works fine, but when trying to load the package,
there's a DLL - dependency on
2008 Sep 12
2
Greyed text in the background of a plot
Hi!
Is there any way of having a greyed ("ghosted") text
(i.e, 2006) in the background of a plot?
I'm making a dynamic plot and would like to show the
year of each time step as a big greyed text in the background.
(the idea comes from Hans Rosling video:
http://video.google.com/videoplay?docid=4237353244338529080&sourceid=searchfeed
)
Thanks
Agus
--
Dr. Agustin Lobo
Institut
2009 Jul 03
4
Function to eliminate blank space within strings?
Is there an specific function
to eliminate blank space within
strings?
Thanks
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster
2009 Sep 02
1
Problem at subsetting matrix by using dimnames
Given:
> mitest <- matrix(1:16,ncol=4)
> dimnames(mitest)[[1]] <- c("a","b","c","d")
> dimnames(mitest)[[2]] <- c("a","b","c","d")
> mitest
a b c d
a 1 5 9 13
b 2 6 10 14
c 3 7 11 15
d 4 8 12 16
I can do:
> mitest[cbind(c(1,2,3),c(2,3,2))]
[1] 5 10 7
but using the names does not
2008 Jun 27
4
Recoding
Hi!
Given a vector (or a factor within a df),i.e. v1 <- c(1,1,1,2,3,4,1,10,3)
and a dictionary
cbind(c(1,2,3),c(1001,1002,1003))
is there a function (on the same line than recode() in car)
to get v2 as c(1001,1001,1001,1002,1003,4,1001,10,1003) ?
I'm using myself a function based on match() since
long ago (I think that thanks to advice by Prof. B. Ripley),
but would like to know if there
2010 Jan 28
2
color palette for points, lines, text / interactive Rcolorpicker?
I'm looking for a scheme to generate a default color palette for
plotting points, lines and text (on a white or transparent background)
with from 2 to say 9 colors with the following constraints:
- "red" is reserved for another purpose
- colors should be highly distinct
- avoid light colors (like "yellow"s)
In RColorBrewer, most of the schemes are designed for area fill
2008 Jun 12
1
Subset in cast: compact form?
Hi!
How can I subset several variables in cast?
For example, I can do it for one, (ie, ph):
cast(am, organismo +arriba ~ variable,subset=variable=="ph",mean,na.rm=T)
For selecting ph, temperature and Ba I'm using:
cast(am, organismo +arriba ~ variable,subset=variable=="ph"
variable=="temperature"| variable== "Ba",mean,na.rm=T)
Is there a more
2008 Dec 04
0
reading files (readOGR) and non-ascii characters
I'm forwarding to this list as I've got no
answer in [R-sig-Geo] and perhaps this
issue is not exclusive of readOGR()
I'm using ubuntu 8.04 andR version 2.8.0 (2008-10-20)
-------- Original Message --------
Subject: readOGR and non-ascii characters
Date: Wed, 03 Dec 2008 14:22:34 +0100
From: Agustin Lobo <aloboaleu at gmail.com>
Reply-To: Agustin.Lobo at ija.csic.es
To:
2012 Oct 16
2
dynamic plots
Greetings,
The website fivethirtyeight has a great plot.
http://www.nytimes.com/interactive/2012/10/15/us/politics/swing-history.html
Can this be done with R or GGobi or GGPlot?
thanks,
Tom
2009 Dec 10
1
Labeling plot points
Hi, all. I've been searching for a while to find out how to create an
scatterplot which would let a user interact with it, specifically by
hovering the mouse over a point and having a pop-up appear with data about
the point. The pop-up would disappear when the mouse moved away. I've
included a mock-up below.
I've found out how to use identify() to make a label appear when clicking a
2008 May 19
2
Log or diary file
Hi!
Is it possible to set a file to which both
commands and output would get automatically
saved? I've tried with sink(), but only get
the output. I mean something
like a combined history and sink, as you
get with File/Save to File.. in the windows
GUI.
Tis is done with diary filename in Matlab,
and you can state diary on and
diary off to control what is being saved to
the file.
Thanks
Agus
2008 Apr 16
1
SVG format from any R graphic GUI?
I have problems with emf files because OpenOffice does
a poor job at importing figures in this format. On the other
hand, imported eps figures are not displayed, just printed.
Is there any R graphic gui able to export as SVG (or
other vector format)? I've
tried JGR, iplots and svGUI.
Thanks!
Agus
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis
2011 Aug 24
1
as.numeric() and POSIXct format
Hi!
I'm confused by this:
> as.numeric(as.POSIXct(518400,origin="2001-01-01"))
[1] 978822000
I guess the problem is that as.numeric() assumes a different origin, but cannot find
any default origin.
How can I get back the seconds from the POSIXct format? In other words, which
the inverse function of as.POSIXct()?
I've tried as.numeric and unclass() using a origin=