Displaying 20 results from an estimated 10000 matches similar to: "Zoom in in a plot"
2010 Dec 07
3
More elegant magnitude method
I have a need to find the order of number to get a scaling parameter as a
power of 10. I have a function that works *so far*, but it is ugly and
probably buggy. In the interest of avoiding code-based outliers in my
data, I thought I would ask if anyone here has a better way.
> scl <- function(x){
+ length(charToRaw(format(trunc(x), scientific = F)))-1}
> a <- 123456789
> b <-
2011 Apr 11
1
Zoom on simple.violinplot
Hello,
I am using the function simple.violinplot from the package UsingR.
I have some outliers in my dataset so that the distribution has very long
tails.
As a result, the y-axis of the output of simple.violinplot extends to very
large values. I would like to zoom on the y-axis with a command such as
ylim=c(a,b), as in boxplot(x,ylim=c(a,b)). However, doing
simple.violinplot(x,ylim=c(a,b)) does
2008 Oct 17
4
R plot
All -
When I plot something like
a<-rnorm(5)
b<-rnorm(5)
plot(a,b,col = "red")
points(10,-10)
The last point is missing because it is out of
range of the first plot.
I just try to switch from Matlab to R. In Matlab,
it always can automatic adjust the xlim and ylim
for such case.
Is it possible auto adjust in R? Otherwise
keep tracking xlim and ylim is really annoying.
2010 Nov 01
1
Possible memory leak in loop.
I was trying to use memory.size() to determine whether a code loop I am
executing created a memory leak, since one replicate of the simulation
takes 670.98 seconds according to proc.time(), while 5 replicates takes
170762 seconds. So I set it up as:
memA <- memory.size()
looping code...
memB <- memory.size()
memA returns as 9.3, and memB returns 11.3. I'm not familiar with
2011 Mar 15
1
(no subject)
I was wondering if there is a way to get read in a single keystroke at a
time in R as a string, akin to ncurses-style interfaces. I looked into
readLines, readChar, etc. using stdin, but these all require the use of an
end of line. Has anyone ever had need to do this or have any ideas on how
to do this?
Thanks,
Jon
PS I apologize if this double-sends, but I am having mail client issues.
2011 Mar 03
3
Probabilities greather than 1 in HIST
Dear all,
I am a newbie in R and could not find help on this problem. I am trying to
plot an histogram with probabilities in the y axis. This is the code I am
using:
#TLC uniform
n=30
mi=1; mx=6
nrep=1000
xbar=rep(0,nrep)
for (i in 1:nrep) {xbar[i]=mean(runif(n,min=mi,max=mx))}
hist(xbar,prob=TRUE,breaks="Sturges",xlim=c(1,6),main=paste("n =",n),
xlab="Média",
2008 Oct 13
1
Blowing up portions of a graph
Hi,
I have a really large graph and would like to zoom in on portions of the
graph and post them as blocks below the graph.Is there an add on package to
do this?
--
Rajesh.J
------------------------------------------------------------
"I skate to where the puck is going to be, not where it has been." - Wayne
Gretzky
-------------------------------------------------------------
2007 Nov 21
2
Changing axis scale
Hello R users,
Is it possible after making a plot(x,y) to change axis scale?
For example : I have a range of 0 to 3000 in my y-axis and I want to make a
zoom between 2000 and 3000.
Thanks for any help.
--
View this message in context: http://www.nabble.com/Changing-axis-scale-tf4850633.html#a13878705
Sent from the R help mailing list archive at Nabble.com.
2010 Oct 25
1
lowess() won't handle NAs
Dear Masters,
I'm driving crazy with the lowess() function....
my intent is smoothing confidence intervals for predicted y values in a
linear model lm() setting
since in the predict() function there exists an option for predicting NA
values, I instead encounter problems when I fit a missing values x variable
to the predicted terms.....,impossible task!!!
I've been banging on my head
2010 Nov 10
1
external R scripts
Is it possible to send data from an executing R script, to external R script files, on linux in this case, get that external R script to execute, and pass results back to the central script? If so what commands should I be looking at? I've googled for R and external, stuff like that but no luck.
The reason for the question is that I need to generate simulation data, then perform several
2010 Nov 29
1
Two dimensional Array defined on intevals
Hi I am new to R and am trying to set up a two-dimensional array/matrix with
the elements defined by the function similar to below. Been trying to use
outer with apply but can't seem to get the indexing quite right. Is their a
simple way of accomplishing this task ??
-----
/
| 1 x < 0.5 & y < 0.5
|
2010 Dec 07
3
string
Hi,
I'm running R 2.11
Does anyone know if it possible to transform one character vector to one
character string ?
Many thanks
Benoit
--
Benoit Wastine
Laboratoire des Sciences du Climat et de l?Environnement (LSCE/IPSL)
CEA-CNRS-UVSQ
CE Saclay
Orme des merisiers
B?t 703 - Pte 13A
91191 Gif sur Yvette Cedex
France
Tel : 33 (0)1 69 08 21 97
Fax : 33 (0)1 69 08 77 16
2010 Dec 15
1
Help about nlminb function
Hi Everyone,
Can anyone help me resolve a problem that i'm having with nlminb. The
problem is that it stops after just one iteration and returns the same
values as "start" ones.
Thank you very much for your help.
Sincerely.
--
Kamel Gaanoun
(+33) (0)6.76.04.65.77
[[alternative HTML version deleted]]
2011 Jan 10
2
how to wrap a long line in R scripts?
The guide of R Code style recommends to write script with a maximal
length of 80 characters?
how to break a line longer than 80 characters like
filename_name <- ("/blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/"/
blaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/data.csv")
I did not find any answer while googling.
Thank you!
2011 Jan 19
1
Quantile Regression: Extracting Residuals
Dear R users
Is there a way to obtain the residuals from a model fitted by quantile
regression? Thank you.
Thanaset
--
View this message in context: http://r.789695.n4.nabble.com/Quantile-Regression-Extracting-Residuals-tp3225423p3225423.html
Sent from the R help mailing list archive at Nabble.com.
2011 Apr 12
1
Using help in Windows version of R with disabled browser
Dear colleagues,
I am trying to get someone to use R on MS Windows with the browser
disabled. My question is how does he/she get to use R-help which goes
off the browser (and correspondingly complains about the inability to
start firefox, etc). In linux, which is what I use, this is not a
problem: what needs to be set in Windows to replicate this behavior?
Sorry if I am not clear: please feel
2010 Dec 17
1
Alter plot point size by value of the plot value
R folks,
I am trying to create a mhtplot plot that will alter the point size via the plot point value. The size of the point should change via a set criteria such as:
if point value <10^-6 size 3x
else if 10^-3> point value >10^-6 size 2x
else point value >10^-3 size is x
I consider myself an R newbie, and I am assuming that I could do this via some sort of function to change
2011 Apr 14
2
appending to a vector
Which one is more efficient?
x2=c()
for (i in 1:length(x)) {
x2=c(x2,func(x[i]))
}
or
x2=x
for (i in 1:length(x)) {
x2=func(x[i])
}
where func is any function?
Dirk
--
View this message in context: http://r.789695.n4.nabble.com/appending-to-a-vector-tp3449109p3449109.html
Sent from the R help mailing list archive at Nabble.com.
2011 Feb 24
2
create dummy variables by for loop
HI, Dear R community,
I try to create 100 dummy variables like the following:
ack$id_1 <- (ack$ID==1)*1
ack$id_2 <- (ack$ID==2)*1
..
.
ack$id_100 <- (ack$ID==100)*1
I used the following codes:
for(i in 1:100){
ack$id_[i] <- (ack$ID==i)*1
}
But only one column is created, can anyone help me?
Thanks a lot!
--
Sincerely,
Changbin
--
2010 Dec 13
2
Integration with LaTex and LyX
Hello,
Are there any packages which allow for a good integration between R and
LaTex / LyX? I'm interested mainly in automatic (automagic?) imports of
plots/graphics.
Thanks in advance and best regards,
Eduardo de Oliveira Horta
[[alternative HTML version deleted]]