similar to: Hydrology plots in R

Displaying 20 results from an estimated 1000 matches similar to: "Hydrology plots in R"

2010 Mar 12
5
Vertical subtraction in dataframes
Hello all, I have not been able to find an answer to this problem. I feel like it might be so simple though that it might not get a response. Suppose I have a dataframe like the one I have copied below (minus the 'calib' column). I wish to create a column like calib where I am subtracting the 'Count' when 'stain' is 'none' from all other 'Count' data for
2010 Apr 03
2
Using ifelse and grep
Good Morning, I am trying to create a new column of character strings based on the first two letters in a string in another column. I believe that I need to use some combination of ifelse and grep but I am not totally sure how to combine them. I am not totally sure why the command below isn't working. Obviously it isn't finding anything that matches my criteria but I am not sure why. Any
2012 Jun 11
2
Define a variable on a non-standard year interval (Water Years)
Hello, I am trying to define a different interval for a "year". In hydrology, a "water year" is defined as the period between October 1st and September 30 of the following year. I was wondering how I might do this in R. Say I have a data.frame like the following and I want to extract a variable with the water year specs as defined above:
2009 Nov 10
3
Dates plotting backwards
Hello, I am having a little trouble formatting my dates correctly. When I plot something using the following commands, R plots the most recent date on the left of the figure and then earlier date on the right of the figure. Given that English is read from left to right I would like to have the dates on my figure arranged in the same way. I am sure that this is something fairly simple but I was
2010 Nov 17
2
Drop non-integers
Hello all, I have a fairly simple data manipulation question. Say I have a dataframe like this: dat <- as.data.frame(runif(7, 3, 5)) dat$cat <- factor(c("1","4","13","1","4","13","13A")) dat runif(7, 3, 5) cat 1 3.880020 1 2 4.062800 4 3 4.828950 13 4 4.761850 1 5 4.716962 4 6
2010 Feb 20
3
Error Bars in lattice- barcharts
Hello, I am attempting to write a script that adds error bars to a barchart. I basing my attempt heavily on the following thread: http://tolstoy.newcastle.edu.au/R/e2/help/06/10/2791.html I can't seem to get around the problem that was discussed in the thread. The following example should illustrate my problem. Sorry about the messy example but I am 1) trying to make it as close as possible
2012 Jan 11
1
R CMD check pkg and 32/64 bit.
R gurus: I'm trying to get another round of rconifers out and I need some advice/help crushing differences in the examples test. I'm trying to make sure the max sdi values are being respected. I've added a tests/rconifers-Ex.Rout.save (from windows i386-pc-mingw32) and when I ran R CMD check (both R-2.13.0), I got the following results: * using log directory
2010 Jun 22
1
k-sample Kolmogorov-Smirnov test?
Hello, I am curious if anyone has had any success with finding a R version of a k-sample Kolmogorov-Smirnov test. Most of the references that I have able to find on this are fairly old and I am wondering if this type of analysis has fallen out of favour. If so, how do people tend to compare distributions when they have more than two? Is it reasonable to pursue an adjusted p-value method. That is,
2010 Nov 05
2
[LLVMdev] Hoisting elements of array argument into registers
Hi, The Glasgow Haskell Compiler LLVM backend is generating a lot of code which appears to be optimised by LLVM quite poorly. The problem is demonstrated by this C source code: int wf(int sp[]) { if (sp[0] == 0) { return sp[2] + sp[3]; } else { sp[3] = sp[3] + (sp[1] * 5); sp[2] = (sp[2] + sp[0]) + 1; sp[1] = sp[1] - 1; sp[0] = sp[0] - 1;
2008 May 07
3
use list elements to subtract values from the dataframe
Hi, I have a dataframe wf existing of a header with different labels and beneath the values of those labels : wf: label1 label2 ... 0,45 0,21 0,10 0,45 .... .... I have a list fl <- c("label2","label3",..) Isn't possible to use the list elements in the list in order to subtract values from the dataframe? like : wf$fl[[1]] When I do in R I get :NULL
2009 Nov 13
2
linear model and by()
Hello R list, This is a question for anyone who has used the by() command. I would like to perform a regression on a data frame by several factors. Using by() I think that I have able to perform this using the following: > lm.r <- by(master, list(Sectionf=Sectionf, startd=startd), function(x) lm (tot.c ~ starttime, data = x)) So that is, I would like to perform separate regressions for
2003 Apr 18
1
Help with nlme--freq weights, logit model, and more
Below you will find the output from a failed multi-level model run. I am trying to estimate the following model: Pr(PLFP=1)= logistic regression -> B1_j * bm + B2_j * wm + B3_j bf + B4_j wf + B5 yrsed+ B6 age+ B7 age^2+e_ij B1_j = G01 + G11 bmxd + d1 B2_j = G02 + G12 wmxd + d2 B3_j = G03 + G13 bfxd + d3 B4_j = G04 + G14 wfxd + d4 d1-d4 freely correlated Note that there is no
2010 Nov 06
2
[LLVMdev] Hoisting elements of array argument into registers
I am seeing the wf loop get optimized just fine with llvm 2.8 (and almost as good with head). I'm running on Mac OS X 10.6. I have an apple supplied llvm-gcc and a self compiled llvm 2.8. When I run $ llvm-gcc -emit-llvm -S M.c $ opt -O2 M.s | llvm-dis I see that: 1. Tail recursion has been eliminated from wf 2. The accesses to sp have been promoted to registers 3. The loop has
2010 Nov 05
0
[LLVMdev] Hoisting elements of array argument into registers
Hi Max, > The Glasgow Haskell Compiler LLVM backend is generating a lot of code which > appears to be optimised by LLVM quite poorly. The problem is demonstrated by > this C source code: if I run this at -O3 under llvm-gcc from top-of-tree on x86-64 linux then (1) it computes that g(5) is equal to 95, and main is transformed to just print 95. (2) g is transformed into code with no
2010 Nov 05
2
[LLVMdev] Hoisting elements of array argument into registers
> I see the same with clang. I'm not sure why the optimizers do so much better > when they can see that sp is a local array (the special initial values don't > matter). It is the scalar replacement of aggregates pass that puts everything into registers when sp is a local array. What happens is: the tail recursion in wf is eliminated. wf is inlined into g. scalarrepl turns the
2012 May 09
1
How to apply functions across columns?
Hello, me again. I have a data frame that looks like this (actual dput output at bottom): > head(tencor) date lot wf.id s1 s2 s3 s4 s5 1 08.05.2012 W0X3H0 9 1238 1263 1244 1200 1183 2 08.05.2012 W0X3H0 10 1367 1396 1371 1325 1311 3 08.05.2012 W0X3H0 11 1383 1417 1393 1346 1328 I'd like to add a column to this that gives, for each row, the averages of the
2010 Apr 02
1
Selecting the first row based on a factor
Hello there, I have a situation where I would like to select the first row of a particular factor for a data frame (data example below). So that is, I would like to select the first entry when the factor1 =A and then the first row when factor1=B etc. I have thousands of entries so I need some general way of doing this. I have a minimal example that should illustrate what I am trying to do. I am
2002 Oct 24
1
rsync error: partial transfer (code 23) at main.c(578)
Hi, I am using a freebsd 4.5-stable system. I am using the latest "rsync version 2.5.5 protocol version 26". I tried to rsync my home directory to another machine: rsync -Cavz /homes/yxw/ baggie.mit.edu:/disk1/ &> rsync.out& However, I ran into the error: www/wf-02.jpg www/wf-03.jpg www/www.c www/www.tar www/xiaowei.doc www/xiaowei_dadmom.jpg www/yxw-contact.txt wrote
2010 Nov 05
0
[LLVMdev] Hoisting elements of array argument into registers
Duncan Sands <baldrick <at> free.fr> writes: > > > I see the same with clang. I'm not sure why the optimizers do so much better > > when they can see that sp is a local array (the special initial values don't > > matter). > > It is the scalar replacement of aggregates pass that puts everything into > registers when sp is a local array. Yes, I
2003 Nov 18
1
data.frame subset?
Can someone tell me why this is since I can't seem to find an explination in the docs or FAQ for this. Since there are no "BM" in the mtrs data.frame, but only in the "parent" data.frame (trees), I'm assuming the subset data.frame is still associated with the original. Is that correct and how would I create a completly separate data.frame since I'll be using by,