similar to: problem plotting "ts" in a data.frame

Displaying 20 results from an estimated 10000 matches similar to: "problem plotting "ts" in a data.frame"

2016 Feb 10
0
problem plotting "ts" in a data.frame
On Tue, 2016-02-09 at 16:56 -0600, Spencer Graves wrote: > Hello: > > > I'm having trouble plotting an object of class "ts" that is in a > data.frame. I can do it with(data.frame, plot(...)) but not with > plot(..., data.frame); see the example below. The plot function is generic so the actual function call depends on what arguments you give it:
2005 Sep 21
3
ts.intersect bug?
This code gives an error: a <- ts(1:10, start=0, freq=10) b <- ts(1:10, start=1, freq=10) ts.intersect(a,b) This one works normally (and correctly): a <- ts(1:10, start=0) b <- ts(1:10, start=1) ts.intersect(a,b) Antonio, Fabio Di Narzo. P.S. How to switch off italian error messages to post on r-help? > version _ platform i386-pc-mingw32 arch i386 os
2016 Jan 30
2
In plot.ts, las=1 applies to ylab with multiple series and not to axis labels
Hello: In plot.ts, las=1 applies to ylab and not axis labels with multiple series. The documented behavior is to have las=1 apply to axis labels and not ylab. To see this, please try the following: plot.ts(1:4, las=1) plot.ts(matrix(1:8, 4), las=1) On my Mac, the second displays behavior I did not expect. If I've done something stupid here, please advise;
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
2008 Nov 25
1
Efficient passing through big data.frame and modifying select
> -----Original Message----- > From: William Dunlap > Sent: Tuesday, November 25, 2008 9:16 AM > To: 'johannes_graumann at web.de' > Subject: Re: [R] Efficient passing through big data.frame and > modifying select fields > > > Johannes Graumann johannes_graumann at web.de > > Tue Nov 25 15:16:01 CET 2008 > > > > Hi all, > > > >
2008 Dec 23
1
quotation problem/dataframe names as function input argument.
Dear R friends: Can someone help me with the following problem? Many thanks in advance. # Problem Description: # I want to write functions which take a (character) vector of dataframe names as input argument. # For example, I want to extract the number of observations from a number of dataframes. # I tried the following: nobs.fun <- function (dframe.vec) { nobs.vec <-
2012 Mar 30
1
How to use access results of gregexpr in data frames
Hello, I'm trying to figure out how to find the index of the second occurrence of "/" in a string (which happens to represent a date) within a data frame column. I've used the following code successfully to find the first instance of "/". dframe <- data.frame(date=c("5/14/2011", "4/7/2011")) dframe$x1 <- regexpr("/", dframe[, 1])
2011 Jun 09
3
How to subset based on column name that is a number ?
Hi, I have a data frame with column names "1", "2", "3", ... and I'd like to extract a subset based on the values in the first column. None of the methods I tried worked (below). x <- subset(dframe, 1 = = "My Text") x <- subset(dframe, "1" = = "My Text") x <- subset(dframe, names(dframe)[1] = = "My Text") Q
2005 Nov 09
2
error in NORM lib
Dear alltogether, I experience very strange behavior of imputation of NA's with the NORM library. I use R 2.2.0, win32. The code is below and the same dataset was also tried with MICE and aregImpute() from HMISC _without_ any problem. The problem is as follows: (1) using the whole dataset results in very strange imputations - values far beyond the maximum of the respective column, >
2010 Oct 13
4
Change global env variables from within a function
Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual column names in a data frame, I ran into the following problem: When I rename the columns within my function, I can't seem to get it to
2006 Jan 20
3
Selecting data frame components by name - do you know a shorter way?
Hi! I suspect there must be an easy way to access components of a data frame by name, i.e. the input should look like "name1 name2 name3 ..." and the output be a data frame of those components with the corresponding names. I ´ve been trying for hours, but only found the long way to do it (which is not feasible, since I have lots of components to select):
2011 Jul 08
1
Referencing a vector of data labels in ggplot function
Hi, I really feel I've looked everywhere, although I know this can't be a hard problem. I'd like to be able to call the graph below as a function, but I can't get the function to recognize variables beyond 'dframe'. I've read through many papers on writing functions in R, but I can't get this to work. data <- data.frame('date' = as.Date(rep(c(15101,
1999 Oct 19
2
Summary bug?
Hi, It seems that there's a bug in summary, in the max. output... but max() alone works fine. > hw04.dframe$area ... [41] 1790 1380 1296 2745 798 2306 438649 1481 1559 2450 ... > summary(hw04.dframe) area Min. : 798 1st Qu.: 1349 Median : 1690 Mean : 6962 3rd Qu.: 2306 Max. :438600 ### should read 438649 or, to the point,
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI) library(RODBC) chan <- odbcConnect("MySQL51", uid="root", pwd="xxx") first <- sqlQuery(chan, "select * from example")
2000 Jun 25
1
renaming columns
I frequently get data sets with cryptically-named variables. The datasets are more useful to me with informative variable names. I know that I can rename variables using the following command: dimname(dataset[[2]][index.of.variable.to.be.renamed]<-new.variable.name If I want to do this inside a function (say something I call RenameCol) what is the best way to communicate the
2012 Dec 29
1
bug in plot.ts?
Dear all, I think I have found a buglet in plot.ts plot.ts(x=1,type="n") # correct: does not show the plot plot.ts(x=1,y=1,type="n") # not correct: does show the plot I did not investigate the problem in depth but it could be related to the switch xy.labels, in fact plot.ts(x=1,y=1,type="n",xy.labels=TRUE) # does show the plot
2005 Jun 30
2
ts.plot data labels
Dear R users, I am trying to put labels on the data points on a ts.plot. I have tried: ts.plot(df.ts, gpars=list(xy.labels=colnames(df.ts), xlab="group", ylab="level")) which plots fine but gives no labels xy.labels=TRUE also plots without labels I also tried using text() but got an error Error in xy.coords(x, y, recycle = TRUE) : Argument "x" is
2005 Aug 15
2
How to get a list work in RData file
Dear R-Helper, I want to know how I get a list work which I saved in RData file. For example, > test.xy <- function(x,y) { + xy <- x+y + xy + } > > xyadd <- test.xy(x=2, y=3) > xyadd [1] 5 > x1 <- c(2,43,60,8) > y1 <- c(91,7,5,30) > > xyadd1 <- test.xy(x=x1, y=y1) > xyadd1 [1] 93 50 65 38 > save(list = ls(all=TRUE), file =
2016 Apr 09
2
Adding Two-Headed Arrow in map legend
Dear David, Thank you for your answer. Sorry for the embarrassing mistake. However, even with when I generate a map for the whole world using: eps <- mapCountryData(n, nameColumnToPlot="eps_score", mapTitle="EPS Score",colourPalette=colourPalette, catMethod="fixedWidth", missingCountryCol = "white", addLegend=FALSE) And then use:
2007 Nov 24
1
patch proposal for plot.ts
Hi all. Currently, if you try: > lag.plot(1:10) you get superposed labels '1' and '10'. Things go worse in more extreme cases: x <- ts(1:10) x1 <- lag(x, 4) plot(x1, x) This is due to a mistake in plot.ts. My suggestion is the following really minimal patch to plot.ts: @@ -530,7 +530,7 @@ plot.ts <- text(xy, labels =