Displaying 20 results from an estimated 10000 matches similar to: "Plots: I've deleted axes, now to delete space"
2011 May 09
2
Round down to earliest hour or half hour
I have times and would like to round down to the earliest 30 minute
increment. For instance, a time of
2011-04-28 09:02:00
(the as.numeric value = 1303999320)
I would like it to be rounded down to:
2011-04-28 09:00:00
(the as.numeric value = 1303999200)
Any ideas of how to do this?
-----
In theory, practice and theory are the same. In practice, they are not - Albert Einstein
--
View this
2011 May 05
6
Averaging uneven measurements by time with uneven numbers of measurements
I have a new device that takes measurements anywhere from every second, to
every 15 minutes (depending on changes). The matrix has a date, time and Y
column (Y is the measurement). For three days it is 25,000 rows. How do I
average the measurements by every 30 minutes so my matrix is 48 rows per
day? I have been working on this and cannot figure out a simple method. Any
ideas? Thank you.
-----
In
2011 May 12
3
assigning creating missing rows and values
I have a dataset where I have missing times (11:00 and 16:00). I would like
the outputs to include the missing time so that the final time vector looks
like "realt" and has the previous time's value. Ex. If meas at time 15:30 is
0.45, then the meas for time 16:00 will also be 0.45.
meas are the measurements and times are the times at which they were taken.
meas<-runif(18)
2011 Oct 26
6
sometimes removing NAs from code
Sometimes I have NA values within specific columns of a dataframe (in this
example, the first two columns can have NAs). If there are NA values, I
would like them to be removed.
I have been using the code:
y<-c(NA,5,4,2,5,6,NA)
z<-c(NA,3,4,NA,1,3,7)
x<-1:7
adata<-data.frame(y,z,x)
adata<-adata[-which(apply(adata[,1:2],1,function(x)any(is.na(x)))),]
This works well if there are NA
2006 Jul 18
4
How can I extract information from list which class is nls
Hello!
I work with :
R : Copyright 2006, The R Foundation for
Statistical Computing
Version 2.3.1 (2006-06-01)
On Windows XP Professional (Version 2002) SP2.
At this moment I use the function "nls" combined
with a selfStar model (SSmicmen, related to
Michaelis-Menten equation, and provided by the
"stats" package).
When I realise the following operation (cf. p 59
of the
2011 Feb 08
2
Plot where points are treatment letter
I would like to create a plot of y vs x with different treatments where the
points are actually the letter of the treatment. Here is the code:
A<-as.matrix(rnorm(10,10))
B<-as.matrix(rnorm(10,9.5))
C<-as.matrix(rnorm(10,10.5))
Y<-as.matrix(rnorm(30,13))
X<-rbind(A,B,C)
nA<-matrix("A",10,1)
nB<-matrix("B",10,1)
nC<-matrix("C",10,1)
2011 May 12
1
separate date and time
I have a combined date and time. I would like to separate them out into two
columns so I can do things such as take the mean by time across all dates.
meas<-runif(435)
nTime<-seq(1303975800, 1304757000, 1800)
nDateT<-as.POSIXct(nTime, origin="1970-01-01")
mat1<-cbind(nDateT,meas)
means1<- aggregate(mat1$meas, list(nDateT), mean)
This doesn't do anything as each day
2011 Nov 03
1
For loop to cycle through datasets of differing lengths
I have encountered this problem on several occasions and am not sure how to
handle it. I use for-loops to cycle through datasets. When each dataset is
of equal length, it works fine as I can combine the datasets and have each
loop pick up a different column, but when the datasets are differing
lengths, I am struggling. Here is an example:
A<-1:10
B<-1:15
C<-1:18
2011 Feb 28
3
nls not solving
I am running the following nls equation. I tried it with data that excel was
fitting and got the error:
singular gradient matrix at initial parameter estimates
I thought it was due to a low number of points (6), but when I create a
dataset, I get the same problem. If I remove the parameter "a," then it can
find a solution. Does anyone know what I can do to fit this model?
2009 Jun 15
1
reducing space between tickmark labels and axes labels
Hello,
Does anybody know if it is possible to reduce the spaces between axes labels and axes lables in boxplots? I am trying to fit several plots onto one page ( layout() ) and need to save as much space as possible. I have reduced margins (par(mar)),adjusted font size (cex) and tck, is there anything else I can do?
Thank you
[[alternative HTML version deleted]]
2011 May 10
2
need to delete by time, not date
I have a matrix where one column has a date and another column has a time. I
need to delete all times before 6am. I had combined the Date and Time column
into DateTime.
Mat1:
Weight Date Time
7.6 04/28/11 09:03
8.4 04/29/11 03:11
8.6 04/29/11 05:32
8.6 04/29/11 09:53
1.4 05/01/11 19:52
I tried just picking up the time:
as.POSIXct(Mat1$Time, format = "%H:%M")
but
2005 Nov 04
1
Graphics question on putting axes in the margins
Hello
I am writing an article demonstrating how quantile plots work. In one
figure, I generate 3 sets of normal data, and add different sorts of
outliers to each. I then make 9 qqnorm plots, in a 3x3 array:
Outlier1 Outler2 Outlier3
Dataset1
Dataset2
Dataset3
which I did using mfrow = c(3,3).
I'd like to use the space on the page as efficiently as possible,so I
2006 Jul 28
3
scatter plot with axes drawn on the same scale
Dear useRs,
I'd like to produce some scatter plots where N units on the X axis are
equal to N units on the Y axis (as measured with a ruler, on screen or
paper). This approach
x <- sample(10:200,40) ; y <- sample(20:100,40)
windows(width=max(x),height=max(y))
plot(x,y)
is better than plot(x,y) but doesn't solve the problem because of the
other parameters (margins etc). Is
2011 Apr 18
3
Power Analysis
I am trying to do a power analysis to get the number of replicas per
treatment.
If I try to get the power it works just fine:
setn=c(2,3)
sdx=c(1.19,4.35)
power.t.test(n = setn, delta = 13.5, sd = sdx, sig.level = 0.05,power =
NULL)
If I go the other way to obtain the "n" I have problems.
sdx=c(1.19,4.35)
pow=c(.8,.8)
power.t.test(n = NULL, delta = 13.5, sd = sdx, sig.level = 0.05,
2010 Oct 23
1
removing margin space between columns in lattice plots
Hi list,
>From the xyplot() documentation I'm guessing this may not be possible, but is there a way to specify a scale definition something between relation="free" and relation="same" such that the scales are fixed across rows and column margins are removed for a M x N conditioning plot (sort of like ggplot2 plots)? I find that the margin spacing in between each panel
2005 Sep 21
2
controlling usage of digits & scientific notation in R plots; postscript margins
Dear R users:
I assigned students to make some graphs and I'm having trouble answering
some questions that they have. We are all working on R 2.1 on Fedora
Core Linux 4 systems.
1. In the plot, the axis is not labeled by "numbers", but rather
scientific notation like "-2e+08" or such. We realize that means
-200,000,000. We want to beautify the plot. We would rather
2009 Jun 27
1
compressing the plot's white space
I need to fit a graph into a column of a 2-column paper. I found that
just specifying width and height parameters (3.2in x 3.5in) to plot
doesn't decrease the fonts of the main title, axis titles, and
labeling numbers, and tick sizes. So I have to add cex to all labels
and titles and manage ticks. However, I can't decrease the space
between axis label and numbers on ticks. Is there a
2007 Oct 10
2
Deleting the White Space in an R graph
Hi All,
Is there a way we can delete the empty white space around when we generate any graph/map using R? The final output should be onaly a picture with no white spaces all around.
Cheers,
Pratap
---------------------------------
5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.
[[alternative HTML version deleted]]
2003 Dec 10
4
Scatterplot axes
Please, could someone help me figure out what seems to be a very simple
problem (and is still taking me hours...).
I want to draw a simple scatterplot but with 'equal' axes, i.e. I want both
axes to go from -3 to 3. Values for x lie between -2 and 0.5, values for y
between -2.2 and 3. I have tried 'usr' and 'eqscplot' and a few other
options, but it doesn't give me the
2012 Sep 27
3
Comparing density plots using same axes or same axes scale
Good Evening-
I have a set of nine scenarios I want to plot to see how the distribution
is changing, if one tail is getting larger in certain scenario, currently I
am using this code
colnames<-dimnames(sag_pdfs)[[2]]
par(mfrow=c(3,3))
for(i in 1:9) {
d<-density(sag[,i])
plot(d,type="n", main=colnames[i])
polygon(d,col="red",border="grey")}
where sag is