similar to: for loop for automatic pdf generation

Displaying 20 results from an estimated 1000 matches similar to: "for loop for automatic pdf generation"

2010 Feb 04
1
for loop with if statment problem
Both of the approx functions work correctly individually, but they are not being distinguished in the for loop by the if statments. Any help would be appreciated. for loop of interest is below x <- (structure(list(Site = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,
2010 Sep 15
1
approxfun returning value higher than I would expect
Below is the code that I am using in a much larger function. I would expect a bankfull measure at zero to be between 0.6 and 0.8 approxfun is returning 0.8136986. I am sure that I am missing something. measure_bkf <- (structure(list(measurment_num = c(0, 0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6, 1.8, 2, 2.2, 2.4, 2.6, 2.8, 3, 3.2, 3.4), bankfull_depths_m = c(-0.48, -0.48, -0.42, -0.26, 0.58,
2010 Jun 30
2
ggplot qplot bar removing bars when truncating scale
I'm having problems with this example, it is posted with reproduceable code below, both with the normal 0-6 scale and the desired 3-6 scale (with bars removed). How can I get the graph to have the desired 3-6 scale without removing the bars. Thanks! #Data
2012 Feb 06
1
ggplot2 geom_polygon fill
Hi everyone, i've been trying to make a special plot with ggplot2, but I can't get it to fill the polygon I'd like to see filled so very very much. I want to display the difference or change in the distribution of the modified Rankin Scale between two groups. mRS is a scale for disability or daily activities competence. It looks like this.
2008 Sep 26
2
bar and line plot
Hello All: Using the below dataset how can I make a barplot with Date(X) and NumEggs(Y) by Site. Then plot Temp(lineplot) It seems really simple, but I am having a hard time trying to do it by Site. Thanks Date NumEggs Site Temp 1 2008-04-22 0 Massacre Flat (RK424.5) 51.20 2 2008-04-23 0 Massacre Flat (RK424.5) 50.80 3 2008-04-24
2013 Feb 01
2
Summary of data for each year
Hello All, I have a data with two columns. In one column it is date and in another column it is flow data. I was able to read the data as date and flow data. I used the following code: creek <- read.csv("creek.csv") library(ggplot2) creek[1:10,] colnames(creek) <- c("date","flow") creek$date <- as.Date(creek$date, "%m/%d/%Y") The link to my data
2009 Jan 24
2
ggplot2 - how to change location / position of wind rose axis labels?
Dear R users, First just want to say thank you to all for developing such a wonderful software and packages. I need to produce a wind rose plot. Tried with packages circular and plotrix and couldn't quite get what I want. Moved to package ggplot2 and it's going great. However stuck in how to move axis labels. I am using the wind rose from the help to learn how to do what I need (code
2011 Oct 18
3
Ordering of stack in ggplot (package ggplot2)
I'm trying to reproduce the 3rd graph on the page of this site: http://learnr.wordpress.com/2009/03/17/ggplot2-barplots/ . However, the data below produces a ggplot with the stacks sorted in alphabetical order from the bottom up. I'd like the stacks to be in the order "Europe", "Asia", "Americas, "Africa", "Oceania". Is there an easy way to
2010 May 18
2
Function that is giving me a headache- any help appreciated (automatic read )
note: whole function is below- I am sure I am doing something silly. when I use it like USGS(input="precipitation") it is choking on the precip.1 <- subset(DF, precipitation!="NA") b <- ddply(precip.1$precipitation, .(precip.1$gauge_name), cumsum) DF.precip <- precip.1 DF.precip$precipitation <- b$.data part, but runs fine outside of the function: days=7
2012 Feb 01
3
Plotting bar graph over a geographical map
Hi, I am looking for a way to plot bar on a map instead of the standard points. I have been using ggplot2 and maps libraries. The points are added with the function geom_point. I know that there is a function geom_bar but I can't figure out how to use it. Thank you for your help, Simon ### R-code library(ggplot2) library(maps) measurements <-
2011 Feb 04
1
read.table error
R experts, I am working with a fairly large data set comprised of 563 rows by 116 columns including several different modes. I have been unable to read in the data set completely using the read.table function and the RGui (i.e. nearly half the total number of rows are missing from the data set along with the column names). The data does read in fully using Tinn-R's Rterm; however, at several
2011 Aug 24
1
Scatter plots, linear regression in ggplot2
Hi, Based on some modification that I did to the R Cookbook Graphs Scatterplots code, link:http://wiki.stdout.org/rcookbook/Graphs/Scatterplots%20(ggplot2) I have some questions and I will appreciate a help: - How do I change the legend title? - How can I change the for each linear regression its color and linetype? - How can I add for both the linear regression lines their equations and Rseq
2009 Oct 06
1
ggplot2 applying a function based on facet
Look at the bottom of the message for my question #here is a little function that I wrote USGS <- function(input="discharge", days=7){ library(chron) library(gsubfn) #021973269 is the Waynesboro Gauge on the Savannah River Proper (SRS) #02102908 is the Flat Creek Gauge (ftbrfcms) #02133500 is the Drowning Creek (ftbrbmcm) #02341800 is the Upatoi Creek Near Columbus (ftbn) #02342500 is
2011 Dec 04
1
Polishing my geom_bar for publication
Dear list, I am new with ggplot2 and I have spend quiet some time putting together the following code to create the attached plot. However there's still a few things that I'm having trouble with! I would be grateful if someone can tell me how to fix (1) the colour of my bars into grey scales (2) removing the y-axis (species name) on the right figure to avoid duplication, and (3) fix the
2010 Jun 18
1
ggplot2 boxplot: horizontal, univariate
In ggplot2, I would like to make a boxplot that has the following properties: (1) Contrary to default, the meaningful axis should be the horizontal axis. Lattice does this, for instance, by library(lattice);bwplot(~mtcars$mpg) (2) It is *univariate*, i.e., of a single vector, say mtcars$mpg. I do not wish to make separate plots for the different values of mtcars$cyl. (3) Nothing on the
2009 Apr 07
2
gem install ruby-debug
tinix@Creek:/home/tinix/test/grin# gem install ruby-debug Building native extensions. This could take a while... ERROR: Error installing ruby-debug: ERROR: Failed to build gem native extension. /usr/bin/ruby1.8 extconf.rb install ruby-debug extconf.rb:1:in `require'': no such file to load -- mkmf (LoadError) from extconf.rb:1 Gem files will remain installed in
2007 Jul 31
2
choosing between Poisson regression models: no interactions vs. interactions
R gurus, I'm working on data analysis for a small project. My response variable is total vines per tree (median = 0, mean = 1.65, min = 0, max = 24). My predictors are two categorical variables (four sites and four species) and one continuous (tree diameter at breast height (DBH)). The main question I'm attempting to answer is whether or not the species identity of a tree has
2012 Jan 01
2
Lattice: Understanding How Points Connected by Lines
A data frame has one factor, one date, and one numeric column. When I plot these using the default pch of the open circle (first attachment), xyplot(TDS ~ sampdate | she.s, data = sheep.cast, main = 'TDS in Sheep Creek', ylab = 'Concentration (mg/L)', xlab = 'Time') I see the higher concentration points toward the right on several panels. But, when I change to using a
2010 Aug 03
2
subset based on column names and then subset based on the inverse (grep?, or...)
I would like to be able to grab x and y columns out of a dataframe and then grab all of the columns that are not equal to x or y. I am sure that I am missing something easy. ftbr_UTM_downstream <- (structure(list(site = c("Jennie_Creek_Main_Stem", "Wolf_Pit_Creek_Main_Stem", "Little_Rockfish_Main_Stem_North", "Big_Muddy_Creek_Main_Stem",
2009 Oct 09
1
Placing text in a ggplot
I am attempting to graph 12 months of temperatures, delineate the months with a vline and place the names of the months at the top of the graph. So far I have gotten everything to work except the names, despite getting a similar graph to work yesterday the day before yesterday with Baptise A's help. Can anyone suggest what I am doing wrong. Data set is below code. Thanks. Code