similar to: lattice question

Displaying 20 results from an estimated 9000 matches similar to: "lattice question"

2009 Oct 09
1
Placing text in a ggplot
I am attempting to graph 12 months of temperatures, delineate the months with a vline and place the names of the months at the top of the graph. So far I have gotten everything to work except the names, despite getting a similar graph to work yesterday the day before yesterday with Baptise A's help. Can anyone suggest what I am doing wrong. Data set is below code. Thanks. Code
2017 Jul 22
1
3-day moving average for block maxima
Dear r-users, I would like to construct 3-day moving average for block maxima series. I tried this: bmthree <- lapply(split(dt, dt$Year), function(x) max(sapply(1:(nrow(x)-2), function(i) with(x, mean(Amount[i:(i+2)],na.rm=TRUE))))) bmthree and got the following output. $`1971` [1] 70.81667 $`1972` [1] 68.94553 $`1973` [1] 102.7236 $`1974` [1] 73.6625 $`1975` [1]
2010 Feb 28
1
ggplot 'annotate problem' again.
I had a problem annotating a graph last year ( see http://n4.nabble.com/Putting-names-on-a-ggplot-td907158.html#a907158 for the discussion) Stefan (smu) provided a solution using annotate(). However I apparently did not update the graph file and,now, when I go back to the thread and try to use Stefan's solution it does not seem to work although I am sure that it did then. The problem
2018 May 16
1
Systemfit Question
I can't get my simultaneous equations to work using system fit. Please help. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) str(Empdata) Empdata$gnipc<-as.numeric(Empdata$gnipc) install.packages("systemfit") library("systemfit") pdata <- plm.data(Empdata,
2017 Nov 07
1
fill histogram in ggplot
Hi all, I have the following data and I have a histogram for mms like ggplot(hist,aes(x=hist$mms))+ geom_histogram(binwidth=1,fill="white",color="black")and then I want to fill the color of histogram by probable=1 and probable=0, could anyone help me in this? My data: structure(list(probable = c(1L, 0L, 1L, 1L, 0L, 1L, 0L, 1L, 1L, 0L, 1L, 0L, 1L, 0L, 1L, 0L, 1L, 1L,
2009 May 28
2
ggplot2 legend
Hi: I need some help with the legend. I got 14 samples(Muestreo) and I am trying to plot a smooth line for each sample. I am able to accomplish that but the problem is that the legend only displays every other sample. How can I force the legend to show all of my Muestreos? Thanks in advance. fish_ByMuestreo <- structure(list(data = structure(list(SampleDate = structure(c(3L, 3L, 3L, 3L,
2023 Jan 13
1
Customise Plot tick label on time series plot using date series
Hi, I would like to customise my date series on the plot. I tried this: dt_ts <- ts(dt) autoplot(dt_ts[,2]) + ylab("Charge counts") + xlab("Daily") but the label is not the date series. Tqvm for any help given. > dput(dt) structure(list(time = c("1/1/2014", "2/1/2014", "3/1/2014", "4/1/2014", "5/1/2014",
2023 Jan 13
1
Customise Plot tick label on time series plot using date series
?s 05:11 de 13/01/2023, roslinazairimah zakaria escreveu: > Hi, > > I would like to customise my date series on the plot. I tried this: > > dt_ts <- ts(dt) > autoplot(dt_ts[,2]) + ylab("Charge counts") + xlab("Daily") > > but the label is not the date series. > > Tqvm for any help given. > > >> dput(dt) > structure(list(time
2011 Jun 13
1
Heatmap in R and/or ggplot2
I have a dataframe df with columns x, y, and height. I want to create a heatmap-like plot that creates a grid of x by y, and then color codes the grid depending on the value of height. Is there a ggplot2 object to do this? I'm able to easily do this in Excel with pivot tables and conditional formatting so I'm including an image that is close to the output I want. I want to be able to
2016 Apr 22
1
Unique Ordering
Hi R-Help, data at bottom I've been struggling with a problem where I need to order based on 1) the Frequency "Freq" and 2) keeping each group of 3 of the same type together "Var2" but I want across all groups it to go "high to low" based on the earn factor. Thank you! structure(list(Var1 = structure(c(1L, 3L, 2L, 1L, 2L, 3L, 1L, 3L, 2L, 3L, 1L, 2L, 3L, 1L,
2018 May 16
0
Systemfit
Sadly you failed to set your email program to send plain text and the data is corrupted at my end. I also think you need to reduce the size of the data set... the intent here is to increase your understanding, not debug your particular analysis. I will say that I am having a very challenging time understanding what you are trying to accomplish though. What are the equations that you think need
2010 Apr 05
3
bootstrap confidence intervals, non iid
hello, i need to calculate ci's for each of 4 groups within a dataset, to be able to infere about differences in the variable "similarity". the problem is that data within groups is dependent, as assigned by the blocking-factor "site". my guess was to use a block bootstrap but samples within in these blocks / sites are not of same length. i was not able to find a method to
2010 Apr 12
3
glmer with non integer weights
hello, i'd appreciate help with my glmer. i have a dependent which is an index (MH.index) ranging from 0-1. this index can also be considered as a propability. as i have a fixed factor (stage) and a nested random factor (site) i tried to model with glmer. i read that it's possible to use a quasibinomial distribution, for this kind of data, which i than actually did - but firstly (1)
2018 May 15
2
Systemfit
OK, Let's try this again! Here is the reproducible script; it is long because I had to copy the panel dataset here. My question is related to systemfit; I don't know how to get the result for the entire panel. #Reproducible script Empdata<- read.csv("/Users/ngwinuiazenui/Documents/UPLOADemp.csv") View(Empdata) install.packages("systemfit")
2009 Oct 17
2
Putting names on a ggplot
Putting names on a ggplot Can anyone suggest what I am doing wrong here. I am plotting daily temperatures at Ottawa Ontario for 2008 broken down by months, I seperate them by lines and want to put the names of the months at the top of the chart ( with in the graphing area) Everything is working as I want until I try to add the names of the months. I did something similar a few days ago and I
2008 Feb 08
1
Can I index a dataframe with a reference from/to a second dataframe?
Hello, I am unable to figure out how to code a new column in a data frame based on an existing column that matches a column in a reference data frame, in a relational-db fashion. I would like this to maintain a minimum set of reference tables that may be reused over several similar datasets. Specifically, I have two data frames as listed below, 'Bos' and 'tree.' For each case in
2017 Dec 06
0
Odd dates generated in Forecasts
> On Dec 6, 2017, at 5:07 AM, Paul Bernal <paulbernal07 at gmail.com> wrote: > > Dear friends, > > I have a weekly time series which starts on Jan 4th, 2003 and ends on > december 31st, 2016. > > I set up my ts object as follows: > > MyTseries <- ts(mydataset, start=2003, end=2016, frequency=52) > > MyModel <- auto.arima(MyTseries, d=1, D=1)
2010 May 19
2
contrasts for lmer model
hello, i found it most convenient to use package contrast for planned comparisons on mixed models. for instance i have a model with 2 fixed factors, one with 4 levels (stage) and one with 2 levels (gap) and a nested random factor (site) and i tested gap within level A of factor stage: library(contrast) library(nlme) m1<-lme(rich ~ stage*gap, random=~1|site,data=richness) contrast(m1, a =
2017 Dec 06
1
Odd dates generated in Forecasts
Thank you very much David. As a matter of fact, I solved it by doing the following: MyTimeSeriesObj <- ts(MyData, freq=365.25/7, start=decimal_date(mdy("01-04-2003"))) After doing that adjustment, my forecasts dates started from 2017 on. Cheers, Paul 2017-12-06 12:03 GMT-05:00 David Winsemius <dwinsemius at comcast.net>: > > > On Dec 6, 2017, at 5:07 AM, Paul
2013 Mar 29
1
Create values based on a table of conditions
Hi R help forum, I have a simple data frame of four columns - one of numbers (really a categorical variable), one of dates and one of data. I have over 500,000 data points to work with, spread over 40 files, each named after a different animal. These are contact data recorded by proximity loggers over two years between the animals of the file name and collars being worn by other animals. The