Displaying 20 results from an estimated 25 matches for "free_i".
Did you mean:
free_s
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly.
when I use it like USGS(input="precipitation") it is choking on the
precip.1 <- subset(DF, precipitation!="NA")
b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum)
DF.precip <- precip.1
DF.precip$precipitation <- b$.data
part, but runs fine outside of the function:
days=7
2011 Dec 23
1
simple ggplot2 question
Hello,
I am trying to make a plot using the code below. The plot is divided into two parts, using facet_grid. I would like the vertical axis (labelled 'place') to be different for each location (=part). So in the upper part, only places 'n' through 'z' are shown, while in the lower part, only places 'a' through 'm' are shown. I thought 'free_y'
2009 Oct 06
1
ggplot2 applying a function based on facet
Look at the bottom of the message for my question
#here is a little function that I wrote
USGS <- function(input="discharge", days=7){
library(chron)
library(gsubfn)
#021973269 is the Waynesboro Gauge on the Savannah River Proper (SRS)
#02102908 is the Flat Creek Gauge (ftbrfcms)
#02133500 is the Drowning Creek (ftbrbmcm)
#02341800 is the Upatoi Creek Near Columbus (ftbn)
#02342500 is
2020 Nov 24
2
Cambiar nombre de topic en análisis LDA
Buenas tardes
Estoy haciendo un análisis LDA y me gustaría cambiar el nombre de los
topics a la hora de visualizarlos y en vez de que se llamen 1,2,3...darles
un nombre. ¿Es posible en este código?
lda22 <- LDA(reviews_dtm, k = 22, control = list(seed = 1234))
lda22 %>%
tidy() %>%
group_by(topic) %>%
top_n(10, beta) %>%
ungroup() %>%
mutate(term =
2010 Sep 11
1
Setting scales for ggplot2 with facets
Faceting in ggplot2 seems to permit different scales for different
facets, but I fail
to see how one could control ylim and xlim ranges for each facet
separately.
For instance, I would like to set the ylim = c(0,10) for facet "A"
and ylim = c(42,102) for facet "B". Since the data is out of these
ranges,
setting facet_grid(factor ~ ., scales = "free_y") does not
2010 Aug 24
1
drop unused levels in lattice dotplot axis?
Hi list, I have a data set - something like this
dfr <- data.frame(A=factor(letters[1:25]),B=runif(25), C=sample(LETTERS[1:4],25,replace=TRUE))
and I want to create a dotplot:
library(lattice)dotplot(A ~ B | C, data=dfr, scales=list(y=list(relation="free")))
but this puts uneven spaces along the y-axis in each panel. drop.unused.levels=TRUE will drop conditioning
2009 Jul 24
1
ggplot question
In page http://had.co.nz/ggplot2/scale_date.html , there is a time series
plot for multiple variables at the bottom. i.e
qplot(date, value, data = em, geom = "line", group = variable) +
+ facet_grid(variable ~ ., scale = "free_y")
How can I make different color for different series?
Thanks
--
View this message in context:
2009 Jan 22
1
ggplot2 example
I need to plot two graphics just like the example below but for some reason your example crashes. Using facet_wrap seems to be the cause:
library(ggplot2)
upper <- with(economics, data.frame(date,value = psavert, position = "upper"))
upper
lower <- with(economics, data.frame(date,value = unemploy,position = "lower"))
lower
#upper$date <-
2013 Apr 14
1
Problem plotting continuous and discrete series in ggplot with facet
I have data that plots over time with four different variables. I would
like to combine them in one plot using facet_grid, where each variable gets
its own sub-plot. The following code resembles my data
require(ggplot2)
require(reshape2)
subm <- melt(economics, id='date', c('psavert','uempmed','unemploy'))
mcsm <- melt(data.frame(date=economics$date,
2010 May 09
1
Is it possible to rearrange the facets in ggplot while keeping everything else the same?
Hello,
First, ggplot2 is great!
Second, sorry for the basic nature of my question.
I have data in the form of a melt table like this:
Subject Day Ab Variable Value
1 1 Yes A 3
1 3 Yes A 5
1 5 Yes A 7
2 1 No A 2
2 3 No A 4
2 5 No A 6
3 1 Yes A 1
3 3 Yes A 3
3 5 Yes A 5
4 1 No A 4
4 3 No A 6
4 5 No A 8
1 1 Yes B 3
1 3 Yes B 5
1 5 Yes B 7
2 1 No B 2
2 3 No B 4
2 5 No B 6
3 1 Yes B 1
3 3 Yes B 3
3 5
2011 Jun 30
1
Italicized greek symbols in PDF plots
I know that this has been asked before in other variations but I just can't
seem to figure out my particular application from previous posts. My
apologies if I have missed the answer to this question somewhere in the
archives. I have indeed looked.
I am running Ubuntu 11.04, with R 2.12.1 and ESS+Emacs.
For journal formatting requirements, I need to italicize all the greek
letters in any
2017 Jun 09
2
Color en líneas (ggplot2)
2017-06-08 12:54 GMT-04:00 Javier Marcuzzi <javier.ruben.marcuzzi en gmail.com>
:
> ¿me hice entender?
?No.
Para salir del escollo lo convertiré a gráficos? base y continuaré con mi
vida ?...
?Au revoir.?
--
«Pídeles sus títulos a los que te persiguen, pregúntales
cuándo nacieron, diles que te demuestren su existencia.»
Rafael Cadenas
[[alternative HTML version deleted]]
2009 Oct 06
2
ggplot cumsum refined question (?)
OK, so maybe last night was a little too much at one throw, so I have
reduced the data to two stations- one that has precipitation and one
that does not. This is going to be in the context of a larger data
set. I would like to be able to issue a ggplot command and have cum
sum just act on the facets (factors) to apply this.
library(chron)
library(ggplot2)
DF <- structure(list(date_time =
2009 Jan 14
1
publication statistics from Web of Science
Dear list,
This is a bit of an off-topic question, but I'm hoping to get some
advice from more experienced people. I've used the website "Web of
Science" to manually collect publication counts responding to several
keywords as a function of date, since the 1960s.
http://apps.isiknowledge.com/RAMore.do?product=UA&search_mode=&SID=P1g9lFJp9 at
2010 Feb 04
2
ggplot2 / time series with different scales
I am trying to plot this dataset using ggplot2:
df <- data.frame(
sid = c(rep('11',30),rep('22',30)),
time = rep(ISOdate(year = 2010, month = 1, day = 1:30),2),
sales = c(rnorm(30, 1000, 20),rnorm(30, 900, 10)),
price = c(rnorm(30, 2, 0.5),rnorm(30, 3,0.5))
)
Plotting just the sales can be done easily:
ggplot(data=df, aes(x=time, y=sales, group=sid, color=sid)) +
2011 Jan 10
1
Basic ggplot question
Hello R-Group,
I am trying plotting simple time-series with ggplot2 because the output
looks better and I've heard its richer in features.
I have the following dataset.
> dput(dat)
structure(list(Date = structure(c(14970, 14971, 14972, 14973,
14974, 14977, 14978, 14979, 14980, 14981), class = "Date"), Close =
c(5998.1,
5996, 6060.35, 6101.85, 6134.5, 6157.6, 6146.35, 6079.8,
2008 Nov 17
1
ggplot2: can one have separate ylim for each facet?
In lattice
#toy data
library(ggplot2)
library(lattice)
x <- rnorm(100)
y <- rnorm(100)
k <- sample(c("Weak","Strong"),100,replace=T)
j <- sample(c("Tall","Short"),100,replace=T)
w <- data.frame(x,y,j,k)
xyplot(y~x|j+k,scales=list(y=list(relation="free")))
will give you a scale in each subplot with a range equal to the range
of y
2012 Oct 22
0
Lattice to ggplot2: Reference graphics across facets
Hi,
I'm playing with moving some of my lattice graphics into ggplot2, and I'd
like to ask how to achieve a couple of things, both of which are fully
illustrated in self-contained code (and mostly minimal, although that left
quite a bit) following this written description.
1. I quite often like to use a 'ghosted' reference across facets - for
example, in my example program below,
2010 Jul 05
2
Plot with whispers
Hello!
I need to make a plot with whispers that does the following.
Reads in 50 files, each file containing 200 data points. A file looks like
this:
base100.log
Send Receive
10.5 100.3
15.0 102.4
...
There are 100 lines, each with two data points. I need to read in the 50
files, and plot three lines
The first line is the mean of the send column with whiskers indicating
standard deviation
2010 Oct 29
3
Dickey Fuller Test
Dear Users, please help with the following DF test:
=====
library(tseries)
library(timeSeries)
Y=c(3519,3803,4332,4251,4661,4811,4448,4451,4343,4067,4001,3934,3652,3768
,4082,4101,4628,4898,4476,4728,4458,4004,4095,4056,3641,3966,4417,4367
,4821,5190,4638,4904,4528,4383,4339,4327,3856,4072,4563,4561,4984,5316
,4843,5383,4889,4681,4466,4463,4217,4322,4779,4988,5383,5591,5322,5404