Displaying 20 results from an estimated 10000 matches similar to: "Zoo Plot Can't Get Rid of Box"
2009 Mar 10
5
2 Simple Lattice Plot Questions
Hi,
I have created the plot below and have a few questions about changes.
1) How do I change the "Year" title of each plot so it reads from the top
"2006","2007","2008","2009".
2) How do I get rid of those vertical grey bars in the title bar of each
plot?
I apologise for my ignorance... one of those days :(
James
2009 Oct 01
2
Re gression for levels of a factor/xyplot type="r"
Hi,
I'm sure these are basic problems so I apologise in advance for my
ignorance. I have a dataset with X, Y, and a Factor with 4 levels. I am
trying to figure out how to use lm() to find the r2 value, slope and
intercept of an X~Y regression, for each level of the Factor. Is there a
way to do this automatically without having to specify different subsets of
the factor?
my code so far:
2009 Jan 14
1
Help with Plot/Legend
Dear R-Users
I have 2 questions:
Firstly, If I create a matplot and legend for multiple vectors and then tag
another vector on using matlines (e.g. a 'total' of all vectors), is there
anyway to add the new line to the legend without recreating it? I have
created the plot this way because I would like to define the lty and lwd for
the 'total' vector so that it can be
2009 Mar 22
5
If statement generates two outputs
Hi,
How do I tell an if statement to generate two seperate outputs.
E.g If X>5 I want to create df1 and df2:
if (X>5) {df1<-c(4,5,6,7,8) AND df2<-c(9,10,11,12,13)}
Thanks,
James
--
View this message in context: http://www.nabble.com/If-statement-generates-two-outputs-tp22650844p22650844.html
Sent from the R help mailing list archive at Nabble.com.
2009 Jan 07
2
Plotting a graph for every Level of a Factor
Hello,
I'm sorry if this seems similar to my last post but I thought it was
significantly different to warrent a new thread. Using the dataset below,
is there a way to generate a bar/line plot for the TACC/Catch of every lvl
of stock? i.e. OR1,OR3,OR5. The picture at the bottom of this post is an
example of the bar/line plot for OR1 which was generated when OR1 was the
only stock in the
2009 Oct 05
2
Loop function/comparison operator problem
Hi There,
I have created the following function
format<- function(){
repeat {
form<-readline(paste("\nIn what format do you want to save these
plots?\nChoose from: wmf, emf, png, jpg, jpeg, bmp, tif, tiff, ps, eps, or
pdf.\nNote: eps is the suggested format for publication quality plots.\nPlot
format --> "));
cat("\nI'm sorry, I don't know what that format
2009 Jul 27
2
Split rownames into factors
Hi Guys,
I was wondering how you would go about solving the following problem:
I have a list where the grouping information is in the row names.
Rowname [,1]
X1Jan08 324
X1Jun08 65
X1Dec08 543
X2Jan08 23
X2Jun08 54
X2Dec08 8765
X3Jan08 213
X3Jun08 43
X3Dec08 65
How can I create the following dataframe:
Value Date Group
[1,] 324 Jan 08 X1
[2,] 65 Jun 08
2009 Apr 14
1
Lattice xyplot: Line and Rectangle in legend.
Hello fellow R users,
I have a problem. I have created a barchart overlayed by an xyplot line,
both of which read off the same Y axis. The problem comes when I try to
generate a key. It seems that I can only create either two lines, or two
rectangles. I would much prefer to have the barchat series depicted by a
rectangle, and the xyplot series by a line. Is there a way to do this?
Your help
2008 Mar 06
1
can't merge zoo ojects and convert to ts (been trying for 2 days)
I'm stuck, but am sure it can be done I just don't understand how.
I have data in an irregular timeseries. I want to be able to use stl to
visualise the data (see seasonal parts etc), so I need to change to regular
series of class ts (I think).
I am using 2 zoo objects one is regular and the other is my irregular data.
I am then merging to create the object I want but when I try to change
2009 Oct 12
1
Binding objects with a similar name
Dear R users,
The code below splits a dataset by "target_species" and then further splits
each target species group by year. Finally the sum of a variable called
"total_hook_num" is calculated and then assigned a name based on
(paste(a$target_species[1],a$year[1],sep="").
newsplit<-split(newdataset,list(newdataset$target_species))
for(i in newsplit){
2017 Dec 26
1
Time Series with Neural Networks
Hi,
I am would like to ask few questions.
I am trying to forecast hourly electricity prices by 24 hours ahead.
I have hourly data starting from 2015*12*18 to 2017-10-24
and I have defined the data as time series as written in the code below.
Then I am trying do neural network with 23 non-seasonal dummies and 1 seasonal dummy.
But I don?t know whether training set is enough.( Guess it is 50
2007 Jun 19
4
plot only x- and y-axis with origin, no box()
hi all,
I'm trying for quite some time to have an x- and y-axis, but no entire box.
>plot(..,axes=F)
>axis(1)
>axis(2)
Gives this, but their axes do not go to the origin.
Quite a number of people find this gap between the two axes disturbing.
Has anyone an idea how to let these axes go to the origin?
thank you in advance
[[alternative HTML version deleted]]
2007 Aug 07
11
Positioning text in top left corner of plot
Simple question how can you position text in the top left hand corner of
a plot? I am plotting multiple plots using par(mfrow=c(2,3)) and all I
want to do is label these plots a), b), c) etc. I have been fiddling
around with both text and mtext but without much luck. text is fine but
each plot has a different scale on the axis and so this makes it
problematic. What is the best way to do this?
2004 Oct 25
2
box() and hist()
Hi,
does anybody know why the following is not working:
> hist(rnorm(200))
> box(bty="o")
gives me a box without rounded corners.
System:
> R.Version()
$platform
[1] "i386-pc-mingw32"
$arch
[1] "i386"
$os
[1] "mingw32"
$system
[1] "i386, mingw32"
$status
[1] ""
$major
[1] "2"
$minor
[1] "0.0"
$year
2008 Feb 27
4
plot y1 and y2 on one graph
Dear all
I have a code like
x<-1:10
y1<-x+runif(10)*2
y2<-seq(0,50,length.out=10)+rnorm(10)*10
par(mfrow=c(1,2))
plot(y1~x)
plot(y2~x)
Now I would like to plot y1 and y2 on the same graph, with its two scales
(y1 on left and y2 on rigth side).
Any help are welcome.
Kind regards
Miltinho
Brazil
[[alternative HTML version deleted]]
2000 Nov 27
4
Margin question
I am trying to produce a postscript plot consisting of rectangles and text
labels in R. It is going very well, but I have been unable to get small
margins on the page. I read the documentation on the 'mar' and 'oma'
options, but they claim that the margins should default to being 0.25in
wide, in fact on my plot they are more like 1in each! Here is the
smallest R script that
2010 Feb 10
6
prompts and running means
G'day, I am new user to R, and have been thrown in the deep end with a
something my company want me to write.
my code is as follows:
kenttemp=read.csv("mnowak.11.1.csv")
rows=nrow(kenttemp)-5
kent=kenttemp[1:rows,] #have to remove the last 5 lines of the
graph as they interfere with rest of data
max(kent[,16],na.rm=TRUE)->ymax
ymax=ymax+200 #This is to get
2004 Aug 31
2
I've forgotten, why is box("") the default?
I've searched on CRAN for axes, axis, and other terms
I've already forgotten, without (re)discovering the
reason for S using "non-joining" axes by default, instead
of box("l").
MASS points me towards Cleveland (1993) but I don't
have ready access to this any more. Could someone
give me a one-liner to justify this choice to a sceptic?
It's something to do
2008 Sep 02
1
R Newbie: quantmod and zoo: Warning in rbind.zoo(...) : column names differ
Hello;
I am trying following but getting a warning message : Warning in
rbind.zoo(...) : column names differ, no matter whatever I do.
Also I do not want to specify column names manually, since I am just
writing a wrapper function around getSymbols to get chunks of data
from various sources - oanda, dividends etc.
I tried giving col.names = T/F, header = T/F and skip = 1 but no help.
I think
2009 Sep 27
2
zoo: merging aggregated zoo-objects fails
Dear all,
I have several text files looking like this:
9063032 19700201 22:00 174.067
9063032 19700201 23:00 174.076
9063032 19700202 00:00 174.085
9063032 19700202 01:00 174.091
9063032 19700202 02:00 174.094
9063032 19700202 03:00 174.091
9063032 19700202 04:00 174.082
9063032 19700202 05:00 174.079
And I run this loop:
for (j in 1:nr.of.files)
{
#Import:
DF <-