search for: mdeaths

Displaying 14 results from an estimated 14 matches for "mdeaths".

Did you mean: deaths
2003 Aug 08
1
understanding time series objects
### First, is there a way to access a univariate time series as a matrix instead of a vector? # For example: data(UKLungDeaths) # If I do apply(mdeaths,1,cumsum) # Gives an error as mdeaths is not a matrix but a vector, although when I look at it : mdeaths # the ts object has a matrix like "appearance" # The only way of doing it I've found is: mdeaths2<-as.matrix(mdeaths) dim(mdeaths2)<-c(12,6) mdeaths2<-apply(mdeaths2,2,cum...
2005 Oct 10
1
acf.plot() question
When I run the "acf()" function using the "acf(ts.union(mdeaths, fdeaths))" example, the "acf()" function calls the "acf.plot()" function to generate this plot... http://members.cox.net/ddebarr/images/acf_example.png The plot in the lower right-hand corner is labeled "fdeaths & mdeaths", but the negative lags appear to be...
2017 Oct 18
1
dygraphs, multiple graphs and shiny
...ning a number of dygraphs into one plot. If I am just in an RNotebook, if you look at: https://stackoverflow.com/questions/30509866/for-loop-over-dygraph-does-not-work-in-r the solution to have the plot shown from a RNotebook is code like this: > library(dygraphs) > lungDeaths <- cbind(mdeaths, fdeaths) > res <- lapply(1:2, function(i) dygraph(lungDeaths[, i])) > htmltools::tagList(res) and if you put that into an RNotebook and knit it, it works. Okay in order to have a reproducible example, I now try to create a Shiny App using that example, and the template generated by RS...
2000 Apr 03
1
cbind.ts(),ts.union() (PR#508)
Full_Name: Wolfgang Koller Version: 1.0.0 OS: linux Submission from: (NULL) (137.208.7.48) > data(UKLungDeaths) > ts.union(mdeaths, fdeaths,dframe=TRUE) Error in names<-.default(*tmp*, value = nmsers) : names attribute must be the same length as the vector > cbind(mdeaths, fdeaths,dframe=TRUE) Error in names<-.default(*tmp*, value = nmsers) : names attribute must be the same length as the vector sho...
2004 Jan 01
1
Barplot errors in MASS script
...corresponding examples both in the book and in ../lib/R/library/MASS/script, I'm now trying chapter 4 plotting bars with the following code on a linux box with R 1.8.1: ---------------------- library(MASS) library(lattice) options(echo=T, width=65, digits=5) lung.deaths <- aggregate(ts.union(mdeaths, fdeaths), 1) barplot(t(lung.deaths), names = dimnames(lung.deaths)[[1]], main = "UK deaths from lung disease") if(interactive()) legend(locator(1), c("Males", "Females"), fill = c(2, 3)) ----------------------- The legend doesn't look correct with res...
2005 Aug 02
1
multiple scale
...e for the left axis. ## See also: 'ts.plot', 'ts', 'legend'. ## Author and date: Hauksson, Bjorn Arnar. March 2004. ## Example: ## First paste this function into the R console or use 'source'. #library(ts) #data(UKLungDeaths) #x <- ldeaths #y <- fdeaths/mdeaths #ts.plot.2Axis(x, y) #legTxt <- c("UK lung deaths", "UK female/male deaths (rhs)") #legend(1976.5, 3950, legTxt, lty=c(1:2), col=c(1:2), lwd=2, bty="n") ## ts.plot.2Axis <- function(xleft, xright, digits=1, ticks=5, mar=(c(4,4,4,...
2006 Sep 15
1
"ccf versus acf"
I am trying to run a cross-correlation using the "ccf()" function. When I select plot = TRUE in the ccf() I get a graph which has ACF on the y-axis, which would suggest that these y-values are the auto-correlation values. How should I adjust the code to produce a plot that provides the cross-correlation values? Here is my code: w002dat <-
2008 Oct 28
1
acf() plots of a data.frame: what meaning?
Hello, what is the meaning of the plots of an acf()-plot, when using a data frame as argument? The result is NOT obvious for me. There are combinations of the columns of a dataframe in the reulting plot. But an acf() is just defined for onyl one time-sreies. So what do the plots mean? I did not found a description in the help-page. Ciao, Oliver
2008 Jul 25
1
How to pass function argument of same name to internal call?
I ran across this problem when playing with ccf(). Its function call is >function (x, y, lag.max = NULL, type = c("correlation", "covariance"), plot = TRUE, na.action = na.fail, ...) Internally, ccf() calls plot(), which digs up plot.acf() whose default style is type='h' . I wanted to pass the argument type='l' to the plotting routine, but of
2005 Feb 02
4
(no subject)
...;s Major Landmasses ldeaths (UKLungDeaths) Monthly Deaths from Lung Diseases in the UK lh Luteinizing Hormone in Blood Samples longley Longley's Economic Regression Data lynx Annual Canadian Lynx trappings 1821-1934 mdeaths (UKLungDeaths) Monthly Deaths from Lung Diseases in the UK morley Michaelson-Morley Speed of Light Data mtcars Motor Trend Car Road Tests nhtemp Average Yearly Temperatures in New Haven nottem Average Monthl...
2004 Mar 04
1
Lineair regression modelling between time series //correlation analysis
Dear R specialists, I'm working with time series and want to investigate the relationship between two time series by correlation analysis or by fitting a gen. lineair model to the plot of x(timeserie1) and y(timeserie2). Lin1 <- data.frame( Nr = c(1:lengte), NDII = window(ts.mNDII,c(1998,10),c(2003,11)), InvERC = window(Inv.ERC,c(1998,10),c(2003,11)) )
2004 Mar 24
0
High/low level: Plot 2 time series with different axis (left and ri ght)
...possible for the left axis. ## See also: 'ts.plot', 'ts', 'legend'. ## Author and date: Hauksson, Bjorn Arnar. March 2004. ## Example: ## First paste this function into the R console or use 'source'. #library(ts) #data(UKLungDeaths) #x <- ldeaths #y <- fdeaths/mdeaths #ts.plot.2Axis(x, y) #legTxt <- c("UK lung deaths", "UK female/male deaths (rhs)") #legend(1976.5, 3950, legTxt, lty=c(1:2), col=c(1:2), lwd=2, bty="n") ## ts.plot.2Axis <- function(xleft, xright, digits=1, ticks=5, mar=(c(4,4,4,4)+0....
2003 Apr 09
1
'Apparently' trouble with name spaces and Sweave...
...av2, biopsy, birthwt, Boston, cabbages, caith, Cars93, cats, cement, chem, coop, cpus, crabs, Cushings, DDT, deaths, drivers, eagles, epil, farms, fdeaths, fgl, forbes, GAGurine, galaxies, gehan, genotype, geyser, gilgais, hills, housing, immer, Insurance, leuk, lh, mammals, MASS.data.load, mcycle, mdeaths, Melanoma, menarche, michelson, minn38, motors, muscle, newcomb, nlschools, nottem, npk, npr1, oats, OME, painters, petrol, phones, Pima.te, Pima.tr, Pima.tr2, quine, Rabbit, road, rock, rotifer, Rubber, ships, shoes, shrimp, shuttle, Sitka, Sitka89, Skye, snails, SP500, steam, stormer, survey, syn...
1999 Jul 27
3
Preliminary version of ts package
...Sunspot Numbers uspop Populations Recorded by the US Census Datasets in package ts: ---------------------- accdeaths US accidental deaths 1973-8 beaver1 time series of body temperatures of two beavers beaver2 deaths time-series on UK lung deaths 1974-9 from Diggle (1990) mdeaths, fdeaths as above, for males and females drivers time series on UK road deaths of drivers from Harvey (1989) finance daily closing prices of major European stock indices, 1991-1998 lh dataset on luteinizing hormone from Diggle (1990) nottem time-series of temperatures...