similar to: help reading a variably formatted text file

Displaying 20 results from an estimated 500 matches similar to: "help reading a variably formatted text file"

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:
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)
2007 Jul 25
1
how to use "replace" for efficiency
Hi I think I have been struggling to use replace correctly, I usually work my way around this using a loop, but I think this is in fact inefficient. I have a dataset with runoff from three plots and associated rainfall. However either the datarecording was sloppy, or the rainfall very patchy. So I am trying to remove data from my dataset for which the runoff is larger than the rainfall on 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",
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
2017 Dec 16
3
Finding center of mass in a hydrologic time series
The small bit of script below is an example of what I'm attempting to do - find the day on which the 'center of mass' occurs. In case that is the wrong term, I'd like to know the day that essentially cuts the area under the curve in to two equal parts: set.seed(4004) Date <- seq(as.Date('2000-09-01'), as.Date('2000-09-30'), by='day') hyd <-
2009 Jan 23
1
extract certain months toyears (zoo)
Dear useRs and developeRs, In my diploma thesis I work with a daily time series of glacier runoff data. I did already aggregate them to monthly means etc. Now i want to use just the summer values (I am indecisive by now what that means, but let's make it easy and use months like June). Is there a way to extract the data off this zoo into another zoo with frequency=1 ? Do you have
2018 Sep 10
2
OpenJDK8 failed to work after compiled by LLVM 8 for X86
Hi all, OpenJDK8 jdk8u-dev[1] is just able to work after compiled with LLVM 3.9.1 for X86: $ ./build/linux-x86_64-normal-server-slowdebug/images/j2sdk-image/bin/java -version openjdk version "1.8.0-internal-debug" OpenJDK Runtime Environment (build 1.8.0-internal-debug-xiangzhai_2018_09_09_21_08-b00) OpenJDK 64-Bit Server VM (build 25.71-b00-debug, mixed mode) $ strings
2017 Dec 16
0
Finding center of mass in a hydrologic time series
Hi Eric, How about match( TRUE, cumsum(hyd/sum(hyd)) > .5 ) - 1 HTH, Eric On Sat, Dec 16, 2017 at 3:18 PM, Morway, Eric <emorway at usgs.gov> wrote: > The small bit of script below is an example of what I'm attempting to do - > find the day on which the 'center of mass' occurs. In case that is the > wrong term, I'd like to know the day that essentially cuts
2018 Sep 11
3
OpenJDK8 failed to work after compiled by LLVM 8 for X86
Hi Dimitry, Thanks for your kind response! Thanks for the commit message of Jung's patch, I found that the bug had been fixed in OpenJDK 12 by Zhengyu https://bugs.openjdk.java.net/browse/JDK-8205965 But only backported to 11. So Jung could backport it for OpenJDK 8, thanks a lot! But I argue that the root cause might be in the compiler side, why clang-3.9.1, gcc-6.4.1 couldn't
2009 Aug 04
0
Writing a NetCDF file in R
Dear all, I am attempting to convert 10 NetCDF files into a single NetCDF file, due to the data input requirements of a model I hope to use. I am using the ncdf package, version 1.6. The data are global-scale water values, on a monthly basis for 10 years (ie. 120 months of data in total; at present the data are separated by year, with 12 months of data in each file - mrunoff_1986 through to
2009 Aug 05
0
ncdf package problem - put.var.ncdf
Dear all, I am attempting to convert 10 NetCDF files into a single NetCDF file, due to the data input requirements of a model I hope to use. I am using the ncdf package, version 1.6. The data are global-scale water values, on a monthly basis for 10 years (ie. 120 months of data in total; at present the data are separated by year, with 12 months of data in each file - mrunoff_1986 through to
2018 Sep 12
2
OpenJDK8 failed to work after compiled by LLVM 8 for X86
Reported https://bugs.llvm.org/show_bug.cgi?id=38911 Thanks, Leslie Zhai 在 2018年09月11日 16:55, Dimitry Andric 写道: > Hi Leslie, > > The problem really lies in the OpenJDK code, as it is attempting to > write to a const object. If this seems to work with certain compiler(s) > and optimization settings, it is just luck. :-) > > Here is a reduced example, which shows the
2017 Dec 18
2
Finding center of mass in a hydrologic time series
Eric B's response provided just the kind of quick & simple solution I was hoping for (appears as the function com below). However, I once again failed to take advantage of the power of R and have reverted back to using a for loop for the next step of the processing. The example below (which requires the library EGRET for pulling an example dataset) works, but probably can be replaced
2015 May 05
3
Why is the diag function so slow (for extraction)?
Looks like the c(x)[...] bit used to be as.matrix(x)[...]. Not sure why the change was made many years ago, but this was before names were handled explicitly. It would definitely be better to not force the duplicate, at least in the case where we are sure c() and [ would not dispatch. Best, luke On Mon, 4 May 2015, peter dalgaard wrote: > >> On 04 May 2015, at 19:59 , franknarf
2017 Dec 18
0
Finding center of mass in a hydrologic time series
Hi Eric, the following works for me. HTH, Eric library(EGRET) StartDate <- "1990-10-01" EndDate <- "2017-09-30" siteNumber <- "10310000" QParameterCd <- "00060" Daily <- readNWISDaily(siteNumber, QParameterCd, StartDate, EndDate) # Define 'center of mass' function com <- function(x) { match(TRUE, cumsum(x/sum(x)) > 0.5) -