Displaying 20 results from an estimated 10000 matches similar to: "R: graphics devices"
2005 Sep 07
1
Text Size in Legend
Hello,
I need to reduce the size of the text in a legend since the legend is
overlapping with the curves in my plot. I've not been able to identify any
way to achieve this in the documentation. Anyone have any suggestions on how
to scale down the text or the overall legend?
Thanks in advance for your help!
Chris Diehl
[[alternative HTML version deleted]]
2005 Mar 04
11
R: simulation
hi all
a simple question
i want to run simulations in r. i however want the experiments to be
repeated at a later time with exactly the same numbers by other users.
can i set the random number seed for rnorm in some way?
e.g. is there some arguement that goes with rnorm?
please supply an example
regards
Allan
2005 Sep 15
2
R: deleting rows
hi all
hopefully some one can help.
assume that i imported the following data into R (say the data frame is
called a)
x1 x2 x3
1 NA 3
1 2 NA
1 2 3
3 NA 6
4 5 9
7 5 6
7 8 9
NA 7 9
How can i construct a new data frame that only contains those rows that
does not contain the NA's? is these a quick way?
ie
x1 x2 x3
1 2 3
4 5 9
7 5 6
7 8 9
in this example we can simple use
2004 Sep 29
3
R: string connections
hi all
i have a simple question:
lets assume that i can enter a variable (a) equal to some value, say
100. obviously a could be any value. i would like to create a plot with
a main heading as
hi all
"some writing" + a
how would own create a string by combining a string with a numeric
variable?
hope the question is not too confusing.
e.g. say a=5 then i want something like
2005 Apr 11
4
R: function code
HI
sorry to be a nuisance to all!!!
how can i see the code of a particular function?
e.g. nnet just as an example
2000 Jan 28
1
Activating Graphics History
I'm having trouble finding documentation on how
to activate the "record graphics history" option via
a command line (as opposed to having to use the menu).
I would like to store a series of graphics. The readme says:
`The History menu allows the recording of plots. When plots have been
recorded they can be reviewed by PgUp and PgDn, saved and replaced.
Recording can be turned
2005 Feb 15
2
Could anyone answer for the following question
Hello ,
could anyone answer for the following question for me:
I am using R 2.0.1 under Windows XP. I want to write a function that
makes four graphs and stores each of them in graphics history. When the
function finishes, in other words, I want its graphical output to be
stored in a way that I can look at it using PgUp and PgDn. I think I need
commands I can put in a function that
2004 May 09
2
windows(record=T) loses last plot (PR#3663)
The audit trail indicates that PR#3663 is not reproducible and/or fixed,
but I believe windows(record=T) is still not working as documented:
windows(record=T)
for(i in 1:5) plot(0, 0, cex=4, pch=as.character(i))
After cycling through the plots with PgUp and PgDn, the user finds out
that plot 5 is lost. Indeed,
.SavedPlots
reports that only 4 plots were saved. I'm running the example in
2005 Feb 24
4
r: functions
hi all
i have a function that uses two inputs, say xdata and ydata. An example
is the following,
simple1<-function(xdata,ydata)
{
ofit<-lm(ydata~xdata)
list(ofit)
}
say i use arbitray number for xdata and ydata such that
D =
x1 x2 y
1 1 10
2 6 6
3 10 7
x<-D[,1:2]
and
y<-D[,3]
if one uses these inputs and rund the program we get the following:
>simple(xdata=x,ydata=y)
2008 Oct 06
2
Graphics window BUG
I thought this problem would be resolved when I switched to R version 2.7.0
(for Windows), but no - anytime I plot something that produces more than one
page of graphics, the graphics window starts by showing the first page,
until such time as I hit enter to show me the next page, at which time it
speeds through every consecutive page and freezes on the last one. At this
point the last page is
2004 Feb 10
6
R: lags
hi all
how does one simulate a random walk process?
i.e
y(0)=0
y(t)=y(t-1)+ e(t)
where e(t) is normal(0,1) say.
Regards
allan
2004 Jan 05
4
r: lm question
Hi all
this is a silly question since i should know the answer.
lm(y~x) perfroms linear regression with the intercept included.
How do i estimate the equation without the intercept?
cheers
2004 Feb 03
4
R: lags and plots
Hi all
I want to calculate certain lags of a time series and plot them
simultaneously on a graph. can anyone help?
2010 Feb 11
1
Fwd: Recall function: "evaluation nested too deeply: infinite recursion / options(expressions=)?"
hello all
i searched the archives and couldn't get a solution to the following question.
i have the following function:
F=function(z,v)
{
if (v==-.5) return(1) else return(2*v/z + 1/Recall(z,v-1))
}
and while testing whether it works (ie F(z,v) is approx = besselK(z,1+v)/besselK(z,V). the recursion formula allows one to calculate besselK(z,1+v)/besselK(z,V) for large values of z )
2005 Aug 11
3
sub set selection
hi all
is there a package that undertakes subset selection but BASED ON AIC or
any other information criteria.
i've seen the "subselect" and the "leaps" package but i have not played
around with them yet.
thanx
2008 Jan 22
1
R: determinants and inverses
hello all
sorry for the following "none" R related question.
does anyone know of a reference to calculate the following identity:
|I + ABC|
where I is an identity matrix and A, B,C may not have to be square matrices?
you help will be greatly appreciated.
H. V. Henderson; S. R. Searle
SIAM Review, Vol. 23, No. 1. (Jan., 1981), pp. 53-60.
provides a result to
2005 Jul 12
5
R: to the power
hi all
why does R do this:
(-8)^(1/3)=NaN
the answer should be : -2
a silly question but i kept on getting errors in some of my code due to this
problem.
i solve the problem as follows:
say we want : (-a)^(1/3)
then : sign(a)*(a^(1/3)) works
but there has to be a simpler way of soing such a simple mathematical operation.
thanking you
/
allan
2004 Feb 24
5
r: plots
hi all
i have another probably simple question.
I have three variables say x, y and z. x and y are quite large and z is
relative small.
how can one plot the three variables on the same graph with two separate
axis?
(one for x and y and the other for z)
e.g.
x<-c(101,110,150,167,120)
y<-c(120,135,175,95,200)
z<-c(0.001, 0.15, 0.6, 0.8, 1)
regards
Allan
2005 Sep 05
3
numerical intergation
how does one numerically intergate the following:
A=function(x,y)
{
xy
}
over the range: 2<x<0 4<y<10
say.
ie how would one set up the integrate function?
i forgot!
2004 Feb 03
3
R: plotting multiple functions
Hi all
Another simple question.
I would like to plot three graphs one the same plot with different
colours. Say red, blue and black. Here are the functions.
r1<-1+5*cos(2*pi*seq(1:100)/20)+rnorm(100)
r2<-1+7*sin(2*pi*seq(1:100)/20)+rnorm(100)
r3<-1+7*sin(2*pi*seq(1:100)/20)+5*cos(2*pi*seq(1:100)/20)+rnorm(100)
Regards
Allan