Hi everyone,
I'm trying to plot some data across time. I have a list of articles, ranks,
date/times, authors, etc. Someone suggested using zoo and someone suggested
using ts. I'm pretty new at this and have been trying a simple if() plot()
statement, but it doesn't seem to work. I keep getting an
I think you need to put quotes around the column header name,
something like: NYT[Title]
example:
my.df - data.frame(header1=1:3, header2=1:3)
my.df[header2]
Error in `[.data.frame`(my.df, header2) : object header2 not found
my.df[header2]
header2
1 1
2 2
3 3
Hope that
Thank you Tony. I tried that, but still got an error. This is what I got.
if(df[Title]==A)
+ plot(df[B])
Error in `[.data.frame`(df, Title) : undefined columns selected
I Think there is something wrong with my file because when I call [,1] It
gives me the whole data set, but when I call [,2]
ontiveros_pal...@yahoo.com
To: r-help@r-project.org
Sent: Sunday, February 22, 2009 10:50 AM
Subject: Re: [R] Zoo or TS
Thank you Tony. I tried that, but still got an error. This is what I got.
if(df[Title]==A)
+ plot(df[B])
Error in `[.data.frame`(df, Title) : undefined columns selected
I Think
Hello all,
I've been able to separate the columns now so that when I call NYT[,9] it
gives me just that column. I'm still trying to plot however. When I used the
previous if()plot() statement it plots something, but its not what I want. I
want to plot the rank vs time, but its just plotting the
Sorry, forgot to attach the error it is giving me.
if(NYT[Title]==A)
+ plot(NYT[B],ylim=c(0,50),xlim=c(0,50),ylab=B,xlab=A)
Warning message:
In if (NYT[Title] == A) plot(NYT[B], :
the condition has length 1 and only the first element will be used
Thank you
Tony Breyal wrote:
I think
What is NYT? Is it a dataframe? Is Title a column? What exactly
are you wanting to plot? Is it just the values in column B where
Title is equal to A? The posting guide does suggest that you
provide a reproducible set of code/data. You can probably do what you
want if you can explain what you
7 matches
Mail list logo