I'm trying to control the number of labels in the x-axis of my plot. My code
is the following:
graph1<-barplot(total_skew)
axis(1,at = graph1,labels=raw_date[1:length(total_skew)], las=2)
however, the length of my "total_skew" parameter is a few thousand elements,
and all the labels on the x-ax
Hi all,
I have this string "year" and integer 2008 (both are inputs from the
user), and I would like to make a variable called "year2008" that will store
a vector of numbers. Does anyone know how to do this?
Also, if the user later input "year" and "2008", how do I treat this as a
variable;
Hi,
I'm trying to plot multiple lines on one plot. I have a data frame raw,
and i want to plot raw$date on the x-axis and raw$theta, raw$vega,
raw$delta, and a few others on the y-axis, with a legend. However, I'm not
sure what the scale of those data sets are, and I don't know which one will
ha
Thanks! I'll use the which.min function. I've been learning R from the pdfs
on the CRAN website, but I find the texts to be generally introductory, not
comprehensive, and focused on one niche purpose. Can anyone suggest a good
self-teach guide?
Thanks again!
R_Learner wrote:
>
&g
I have a long list of numbers [3.4,5.4,3.67,], and I basically want to
find the index of the number closest to this number that I have, let's say
5.43. How would I do this without writing a for loop (I have to do this many
times for several lists)? Is there a "lookup" function in R?
Thanks!
You guys are completely right...my lines were off the graph. I was also using
points() in addition to lines, so it seems like it needs a pre-specified
range unlike plot().
Thanks!
Peter Dalgaard wrote:
>
> R_Learner wrote:
>> I'm trying to export a graph (any form is goo
I'm trying to export a graph (any form is good). I'm trying to export one
that uses plot() then lines(). however, it seems that the jpeg format and
the pdf format only takes the first line plot, and doesn't even consider the
additional plots. My code is the following:
output_file<-paste(f
Haha I'll definitely keep that in mind...parse does complicated things.
Marc Schwartz wrote:
>
> on 07/03/2008 10:35 AM R_Learner wrote:
>> Thanks guys!
>> I think [[ seems to be the easier way, but I also spent an hour (while my
>> post was pending approval) to
Thanks guys!
I think [[ seems to be the easier way, but I also spent an hour (while my
post was pending approval) to find that the following also works:
temp<- eval(parse(text=paste("data$column_title"")))
Marc Schwartz wrote:
>
> on 07/02/2008 02:10 PM R_Learner w
raw <- read.csv(file=filename, head=TRUE,sep=",")
I've read in a csv file, and I'm looking to access a column whose name is
held in a string.
For example, I want to access raw$one or raw$two, but this will depending on
the string. Let's say that the string is decision<-"one". How would I access
10 matches
Mail list logo