Displaying 20 results from an estimated 5000 matches similar to: "How to calculate min of a dataset that contains empty column"
2010 Jan 07
2
R treating time
Hi all,
I have imported a value 3:00 from Excel into R using read.csv. I want R to
recognise it as 3:00am (time data). How do I do it?
Thanks in advance,
Chris
--
View this message in context: http://n4.nabble.com/R-treating-time-tp1008608p1008608.html
Sent from the R help mailing list archive at Nabble.com.
2009 Sep 14
3
Exporting Numerous Graphs
Hi all,
I have got 27 graphs to export (not a lot...I know!). How can I fit all of
them into a single file like PNG without adjusting the size of the graphs?
What's in my mind is like pasting graphs into Word, in which I can just
scroll down to view the graphs.
Thanks for your attention. Much appreciated.
Chris
--
View this message in context:
2010 Apr 23
4
Remove duplicated rows
Hi all,
I have a dataset similar to the following
Name Date Value
A 1/01/2000 4
A 2/01/2000 4
A 3/01/2000 5
A 4/01/2000 4
A 5/01/2000 1
B 6/01/2000 2
B 7/01/2000 1
B 8/01/2000 1
I would like R to remove duplicates based on column 1 and 3 only. In
addition, I would like R to remove duplicates based on the underlying and
overlying row only. For example, for A, I would like to remove row 2 only
2010 Jan 08
2
R exponential regression
Hi all,
I have a dataset which consists of 2 columns. I'd like to plot them on a x-y
scatter plot and fit an exponential trendline. I'd like R to determine the
equation for the trendline and display it on the graph.
Since I am new to R (and statistics), any advice on how to achieve this will
be greatly appreciated.
Many thanks,
Chris
--
View this message in context:
2010 Apr 18
3
Exporting PDF
Hi everyone,
I have written a script which exports my graphs as a PDF file using the
function pdf().
For instance, I run the script and it exports a PDF called "version 1".
Then, I have got a new dataset and want to run the script again. What it
usually does is overwriting "version 1". But I want it to check if "version
1" already exists. If so, then I want the new
2010 Apr 04
4
ggplot2 geom_rect(): What am I missing here
Hi R fans,
As a newbie following the five-hour rule (after hitting my head against
the wall for five hours, post to this list), I am appealing for some
help understanding geom_rect() in ggplot2.
What I want to do is very simple. I want to generate a plot of
rectangles. Each one represents a business cycle. The x-values will be
pairs representing the start and end of each cycle. The y-values
2010 Apr 20
3
Words appear to be bolded in the PDF output
Hi all,
I have written a note near each of my graphs using mtext.
mtext(text,side=1,line=4,cex=0.5,adj=0)
Then I have exported the graphs as a PDF file.
pdf(file=name,paper='a4',width=7.27,height=10.69)
The mtext appears OK in R. But it looks like it is bolded in the PDF file.
http://n4.nabble.com/file/n2016971/graph.png
I am not sure if this is actually my monitor/computer's
2003 Sep 17
1
plot.hclust: dendrogram too large for window (PR#4197)
plot.hclust:
Setting up a window for a dendrogram assumes the first link is
the shortest and the last is the longest. This is not always the
case when the clustering was done with hclust, method="median"
or method="centroid", and the dendrogram sometimes doesn't fit
within the window.
I propose the fix listed below.
src/main/
--- plot.c Wed Sep 17 01:03:39 2003
+++
2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
Dear R-ers,
I hope there is a really simple solution to my problem.
I've written a function that I saved in an .r file. I source this file
in my code. For a while it worked fine. But then when I run the line:
source("F mylineplot.r")
I started getting a warning:
In readLines(file) : incomplete final line found on 'F mylineplot.r'
I have no idea why - I tried to check and
2009 Sep 14
3
Question about Factors
Hi all,
I am new to R and I have got a question in regards to factors.
Say I have a simple dataset like the following:
Name Time Value
a 1:00 1.25
a 2:00 1.26
b 1:00 1.29
b 2:00 1.28
c 1:00 1.21
c 1:30 1.20
c 2:00 1.23
I want to write a script that automatically plot value against time for a, b
and c.
2008 Jul 30
1
read XML
I have a xml exported by Manifold GIS but I'm not being able to import it
into R using XLM package.
The file have this structure:
<?xml version="1.0" encoding="UTF-8" ?>
- <layout>
<name>Layout 2</name>
<pagesByX>1</pagesByX>
<pagesByY>1</pagesByY>
- <elements>
<legend
2008 Jul 29
4
Graphics function question
Hello
I have created a graph using the following commands:
<<<
startBReP3O1T <- diffs$BReP3O1T - diffs$diff_BReP3O1T
endBReP3O1T <- diffs$BReP3O1T
x <- seq(47,89, length = 10)
ymin <- min(min(startBReP3O1T), min(endBReP3O1T))
ymax <- max(max(startBReP3O1T), max(endBReP3O1T))
y <- seq(ymin, ymax, length = 10)
plot(x,y, type = 'n', xlab = 'Age', ylab =
2011 Jul 01
1
highlighting clusters in a heatmap
I would like to draw horizontal or vertical lines on a heatmap to
highlight the clusters at some specified cut depth of the dendrogram.
As a hacked example, the following code would work if I could set the
coordinates of the top and bottom of the false color image correctly
(ymin and ymax), but the correct values seem to depend on the output
device and its size. I realize that heatmaps use a 2x2
2009 Aug 06
2
Ylim
Hello All:
Can anybody tell me what is the problem with my program please. I have an
error message as appears below.
My program is:
ifn <- "Jul08_09.LM"
data <- read.table(ifn)
ofn <- "Jul.png"
bitmap(ofn, type = "png256", width = 30, height = 30, pointsize = 30, bg =
"white",res=50)
par(mar=c(5, 5, 3, 2),lwd=5)
2010 Nov 04
5
ggplot output
Dear All,
I have this script:
dat <- data.frame(Month = hstat$Date,C_avg = hstat$C.avg,C_stdev =
hstat$C.stdev)
ggplot(data = dat, aes(x = Month, y = C_avg, ymin = C_avg - C_stdev, ymax =
C_avg + C_stdev)) +
geom_point() +
geom_line() +
geom_errorbar()
dat <- data.frame(Month = hstat$Date,K_avg = hstat$K.avg,K_stdev =
hstat$K.stdev)
ggplot(data = dat, aes(x = Month, y = K_avg,
2011 Jan 24
1
ggplot2 - ribbon
Dear List,
I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions
so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following command
m10 + stat_summary(geom="ribbon", fun.ymin="min", fun.ymax="max")
However the ribbon is a dark grey
2012 Jul 26
2
Error Bars ggplot2
Hello,
I'm attempting to plot error bars side by side rather than stacked on top
of each other with ggplot2. Here is the sample code I am using:
#Code
#Data
spd<-c("s","f","f","s","f","s","s","s","f","f","s","f")
r<-c(4.9,3.2,2.1,.2,3.8,6.4,7.5,1.7,3.4,4.1,2.2,5)
2010 Sep 16
1
plotting time series using ggplots
Hi,
I would like to plot a bunch of tree ring width data (time series)
using ggplots, but I'm having trouble figuring out how to do it.
My data is in a data.frame, with years as rownames and a distinct tree
ring series in each column. So, something like this:
rwl<-matrix(rnorm(800), nrow = 100)
colnames(rwl) <- paste('V', 1:8, sep = '')
2011 Nov 16
1
geom_bar with missing data in package ggplot
Dear all,
I was hoping someone could help with a ggplot question. I would like
to generate a faceted bar chart, but missing data are causing
problems.
g<-structure(list(Date = structure(c(11322, 11687, 12052, 11322,
11687, 12052, 11322, 11687, 12052, 11322, 11687, 12052), class = "Date"),
variable = c("Govt Revenues to GDP", "Govt Revenues to GDP",
2013 May 14
1
Tamaño plots y calidad en grafico ggplot
Hola a tod en s,
bueno, un poco al hilo de un mensaje anterior, reformulo la pregunta y
pongo código completamente reproducible, a ver si hay más suerte.
Estoy con un informe y hay que hacer algunos gráficos con datos
diferentes con ggplot2, y hay que poner el mismo tamaño para todos
ellos.
El problema es que R cambia automáticamente el tamaño del área de
trazado y el margen en función de