similar to: how to use "replace" for efficiency

Displaying 20 results from an estimated 800 matches similar to: "how to use "replace" for efficiency"

2013 May 03
1
A problem of splitting the right screen in 3 or more independent vertical boxes:
Hi, Based on par function, I can split the screen into two parts left and right. I wish x occupies the half left screen, and all plants occupy half right screen, which happens right now. But I wish the right screen, to be split in 3 or more vertical parts where each pair of the same type of plant, are together in its own block of boxplot, because each plant has its own unit of measure.
2012 Apr 14
2
master thesis
Hi, For my master thesis I have 24 micro-plots on which I did measurements during 3 months. The measurements were: - Rainfall and runoff events throughout 3monts (runoff being dependant on the rainfall, a coefficient (%) has been made per rainfall event and per 3 months) - Soil texture (3 different textures were differentiated) - Slope (3 classes of slopes) - Stoniness (one time measurement)
2008 Mar 23
2
(no subject)
Is there any way to use more than one color or shape in the same plot. I would like to make the points different colors for various levels of a variable. I have tried a simple 'if' statement in the plot command, but I get an error message. Here is what I have tried and the error message I get: > plot(test, if(test[,1]<8) col="steelblue2" else col="wheat2")Error
2011 Mar 23
2
mean of runoff for several years
Hello everyone I have a dataframe with 4 colums (year, month, day, runoff) for 1993-2009. Now I like to calculate the average runoff for each day. Finally I like to plot the median runoff for all this years. I tried with some loops, but it didn't work. Do you have any Tips for my problem? Any help is greatly appreciated! Thank you very much. Dominique -- View this message in context:
2002 Feb 13
1
nlme package dependencies?
Dear R-help, The following nlme example, from help(Variogram.gls), does not work on my system. > data(BodyWeight) > fm1 <- gls(weight ~ Time * Diet, BodyWeight) > Variogram(fm1, form = ~ Time | Rat)[1:10,] Error in FUN(X[[1]], ...) : unused argument(s) (method ...) It looks like I might not have loaded a necessary package. I did load nls and lattice (the latter not actually being
2002 Nov 19
5
help reading a variably formatted text file
Dear R-Help, I have a generated file that looks like the following: ----- Begin file ----- # # Output File # float Version 2002.700000000000 int Numdays 31 int NumOFEs 1 # # Hillslope-specific variables # char HillVarNames[ 3 ] {Days In Simulation} {Hillslope: Precipitation (mm)}
2000 Mar 29
1
A "stack" function
I am using R in my undergraduate engineering statistics courses, in which I am currently discussing one-way analysis of variance. Many of the data sets for the exercises or examples give the data in the form on one column per treatment level. To use the aov or lm functions such data should be converted to one column with all the response observations and a companion column with indicators of the
2009 May 02
2
Problems producing a simple plot
Dear R Users, I have a data frame of the nature: > head(aggregate_1986) Latitude Mean Annual Simulated Runoff per 1? Latitudinal Band 1 -55 574.09287 2 -54 247.23078 3 -53 103.40756 4 -52 86.99991 5
2009 Oct 27
1
option to control the spac between columns in data frame
Hello, I have a question regarding a way to control the appreance of output exported by R when I use capture.output( x, file = "Directory/file.txt") , I get a text file which when I paste to a word file looks like the first table below. The following table has its clumns spaced closely so when I paste it to a word file it looks continuous. Is there any option in R to make the outputs
2010 Sep 15
1
Difficulty creating Julian day in data frame
Hi, I'm attempting to add a "Julian Day" column to a data frame. Here is my code and the resulting data frame: vic.data <- read.table("C:/VIC/data/vic.data.csv", header=F) names(vic.data) <- c("year", "month", "day", "precip", "evap", "runoff", "baseflow", "Tsup",
2013 Mar 26
2
Plot cumulative sums of rainfall per year
Hi @all, I am biting my nails with the following problem: I have a data set of daily rainfall measurements for the last 20 years. What I want to do is calculate the daily cumulative sum of rainfall but only for every year which means that the cumulative sum has to be reset each year. After the calculations I want to plot each year of cumulative rainfall as a separate line in one graph preferably
2012 Nov 29
4
splitting a string by space except when contained within quotes
I've been trying to split a space delimited string with double-quotes in R for some time but without success. An example of a string is as follows: /rainfall snowfall "Channel storage" "Rivulet storage"/ It's important for us because these are column headings that must match the subsequent data. Here is some code I've been trying: str <- 'rainfall
2012 Jul 04
3
Please help
Dear All, I am a research student in environment. I have only little programming knowledge. I am currently doing the last project about rainfall impact on ground water quality in an area. It happens that I have to use R to read rainfall data (3 dimension) from ASC file (*.asc), and then write them into one NCDF file (*.nc). I have been working very hard on study R, but I
2008 Jun 05
1
choosing an appropriate linear model
I am trying to model the observed leaching of wood preservative chemicals from treated wood during an outdoor experiment where leaching is caused by rainfall events. For each rainfall event, the amount of rainfall was recorded as well as the amount of preservative chemical leached. A number of climatic variables were measured, but the most important is the amount of rainfall. I have tried a
2009 Jun 22
2
New line operator in mtext
Dear R Users, I'm finding that when I execute the following bit of code, that the new line argument is actually displayed as text in the graphics device. How do I avoid this happening? mtext(side=2, line=5.5, expression(paste("Monthly Summed Runoff (mm/month)", "/n", "and Summed Monthly Precipitation (mm x ",10^2,"/month)"))) I suspect that I've
2018 Feb 05
1
pulling recessions out of a hydrograph
Dear R community, I'm hoping someone out there has perhaps done this and can share their code and/or expertise with me. I need to pull recession periods out of a hydrograph - can anyone help me with this? I want to create a subset from streamflow data that consists of just the recession curves - the decreasing runoff after the passage of a peak flow. would really appreciate any help on
2010 Jun 14
2
how to make a barplot similar to Excel’s “clustered column chart”.
I have a matrix with 12 rows (one for each month), 2 columns (baseflow, runoff). I would like to make a barplot similar to Excel’s “clustered column chart”. Here is my matrix ‘x’ 8.258754 13.300710 10.180953 10.760465 11.012184 13.954887 10.910870 13.839839 9.023519 11.511129 7.189241 12.519830 5.925576 17.101491 5.211613 13.585175
2005 Mar 11
2
Calculating lengths of runs of 0 or 1 sequences in meteorological data
Dear List Members, I need some help about programming in S language. My problem is as follows: I have meteorological data (about rainfall measurement each day from 1989-2002), say like http://www.angelfire.com/ab5/get5/data.rainfall.txt or http://www.angelfire.com/ab5/get5/R.rainfall.txt in a sequence of 0(denoting dry day)'s and 1(denoting wet day)'s. I want to construct a frequency
2017 Nov 22
2
How to produce rainfall maps
Fwiw the engine behind geom_raster needs explicit observation-per-row form for input (with no structural normalization), so conversion to points is perfectly proper here, albeit confusing in context. (It's closer to what graphics devices actually use ultimately, but the expansion is laid out very early in ggplot2 because there's no standard for intermediate forms.) Cheers, Mike On Wed,
2008 Jan 24
1
Sliding Window Time Series Analysis - hourly rainfall
I have a time series of rainfall in a dataframe. I would like to be able to aggregate this using a sliding window approach- i.e. a new 24 hourly total is calculated for each hours rainfall. I'm struggling to understand how this might be achieved - currently I've tried looping a sum function to re-calculate a new total at every stage of the loop. for (inp[[9]] in