Displaying 20 results from an estimated 6000 matches similar to: "Logical "in" test"
2010 Aug 06
1
[R-SIG-Mac] Question about line type in contour() function (R 2.11.1)
On 05/08/2010 8:46 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote:
> On Aug 5, 2010, at 5:20 PM, Duncan Murdoch wrote:
>
>> On 05/08/2010 7:18 PM, David B. Thompson, Ph.D., P.E., D.WRE, CFM wrote:
>>> I'm running R 2.11.1 (MacBook Pro and OS X 10.6.4) and am trying to set a line type in the contour() function. What I did was:
>>>
>>>> >
2011 Jul 21
2
Quantreg-rq crashing trouble
Hi
I am using the quantreg package for median regression for a large series
of subsets of data. It works fabulously for all but one subset. When it
reaches this subset, R takes the command and never responds. I end up
having to kill R and restart it.
It appears to be something with the particular data subset, but I can't
pinpoint the problem.
Here are some details
Operating system:
2011 Oct 11
1
singular gradient error in nls
I am trying to fit a nonlinear regression to infiltration data in order to
determine saturated hydraulic conductivity and matric pressure. The
original equation can be found in Bagarello et al. 2004 SSSAJ (green-ampt
equation for falling head including gravity). I am also VERY new to R and
to nonlinear regressions. I have searched the posts, but am still unable to
determine why my data come up
2009 Nov 27
1
R 2.10 Line Type Issue...
Morning folks (at least here on the western side of the U.S.)...
This morning I constructed a contour plot of some bivariate
distributions I'm working with. When I attempted to add a second
contour to the plot using a dashed line (lty=2), R immediately went
off to la-la land, requiring a force-quit. I finally tied the problem
down to this statement:
2011 Nov 02
2
Proper Syntax for Logical Subset in Subset()
I have measured values for 47 chemicals in a stream. After processing
the original data frame through reshape2, the recast data frame has this
structure:
'data.frame': 256 obs. of 47 variables:
$ site : Factor w/ 143 levels "BC-0.5","BC-1",..: 1 1 1 2 2 2 2 2 2 2
...
$ sampdate : Date, format: "1996-04-19" "1996-05-21" ...
$ Acid :
2008 Jan 04
0
Bivariate normal equal-probability curve...
Good morning and I appreciate the availability of a help-list. I am a
professional hydrologist, but not a professional statistician. Yet I
find myself using statistical tools at least part of the time. My
discovery of the R-project through a friend has been most helpful.
Here is my problem:
I'm tasked with fitting a dataset comprising correlated discharges
from adjacent watersheds to
2012 Jan 19
2
POSIXct value display incorrect for some values
First, the reproducable example, showing how converting from character to
POSIXct to character changes the milliseconds in the first time stamp
though not in the second:
> as.POSIXct('2010-06-03 9:03:58.324')
[1] "2010-06-03 09:03:58.323 PDT"
> as.POSIXct('2010-06-03 9:03:58.325')
[1] "2010-06-03 09:03:58.325 PDT"
This seems to be due to truncation of
2005 Oct 07
2
Assign references
Folks,
I've run into trouble while writing functions that I hope will create
and modify a dataframe or two. To that end I've written a toy function
that simply sets a couple of variables (well, tries but fails).
Searching the archives, Thomas Lumley recently explained the <<-
operator, showing that it was necessary for x and y to exist prior to
the function call, but I haven't
2005 Jul 12
4
Calculation of group summaries
I know R has a steep learning curve, but from where I stand the slope
looks like a sheer cliff. I'm pawing through the available docs and
have come across examples which come close to what I want but are
proving difficult for me to modify for my use.
Calculating simple group means is fairly straight forward:
data(PlantGrowth)
attach(PlantGrowth)
stack(mean(unstack(PlantGrowth)))
2017 Oct 20
1
Illegal Logical Values
I'm wondering if WRE Section 5.2 should be a little more explicit about misuse of integer values other than NA, 0, and 1 in LGLSXPs.? I'm thinking of this passage:
> Logical values are sent as 0 (FALSE), 1 (TRUE) or INT_MIN = -2147483648 (NA, but only if NAOK is true), and the compiled code should return one of these three values. (Non-zero values other than INT_MIN are mapped to
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
2024 Jun 06
4
clarifying and adjusting the C API for R
This is an update on some current work on the C API for use in R
extensions.
The internal R implementation makes use of tens of thousands of C
entry points. On Linux and Windows, which support visibility
restrictions, most of these are visible only within the R executble or
shared library. About 1500 are not hidden and are visible to
dynamically loaded shared libraries, such as ones in packages,
2024 Jun 07
1
clarifying and adjusting the C API for R
Thanks for working on this Luke! We appreciate your efforts to make it
easier to tell what's in the exported API and we're very happy to work with
you on any changes needed to tidyverse/r-lib packages.
Hadley
On Thu, Jun 6, 2024 at 9:47?AM luke-tierney--- via R-devel <
r-devel at r-project.org> wrote:
> This is an update on some current work on the C API for use in R
>
2024 Jun 09
1
clarifying and adjusting the C API for R
Thanks so much for your wonderful work, Luke!
I didn't expect such a clarification to happen this soon. This is really
great.
For convenience, I created a quick web page to search the result of
tools:::funAPI().
https://yutannihilation.github.io/R-fun-API/
Hope this helps those who are too lazy to install R-devel to check.
Best,
Yutani
2024?6?6?(?) 23:47 luke-tierney--- via R-devel
2010 Dec 15
3
Applying function to a TABLE and also "apply, tapply, sapply etc"
Dear R-help forum members,
Suppose I have a data-frame having two variables and single data for each of them, as described below.
variable_1 variable_2
10 20
I have written a function, say, 'fun' which uses input 10 and 20 and gives me desired result.
fun = function(X, Y)
{
X + Y #( I am just giving an example of
2024 Jun 07
1
clarifying and adjusting the C API for R
Thanks for sharing this overview of an interesting and much-needed project.
You mention that R exports about 1500 symbols (on platforms supporting
visibility) but this subject isn't mentioned explicitly again in your note,
so I'm wondering how things tie together. Un-exported symbols cannot be
part of the API - how would people use them in this case? In a perfect
world the set of
2008 Aug 28
1
Interaction between aggregate() and length()
Folks,
I've been running into an odd situation that occurs when I use length()
function with aggregate(), but not with either one separately. Together,
the results looks correct but is given an unexpected name. 'if
(stringsAsFactors) factor(x) else x' instead of just 'x'.
# Numbers work ok
tt <- data.frame(idx=c(1,1,1,1,1,1,2,2,2,2,2,2)
2024 Jun 07
1
[External] Re: clarifying and adjusting the C API for R
On Fri, 7 Jun 2024, Steven Dirkse wrote:
> You don't often get email from sdirkse at gams.com. Learn why this is important
> Thanks for sharing this overview of an interesting and much-needed project.
> You mention that R exports about 1500 symbols (on platforms supporting
> visibility) but this subject isn't mentioned explicitly again in your note,
> so I'm wondering
2024 Jun 08
1
[External] Re: clarifying and adjusting the C API for R
Would it be reasonable to move the non-API stuff that cannot be hidden
into header files inside a "details" directory (or some other specific
naming scheme)?
That's what I use when I need to separate a public API from an internal API.
On Fri, Jun 7, 2024 at 7:30?AM luke-tierney--- via R-devel
<r-devel at r-project.org> wrote:
>
> On Fri, 7 Jun 2024, Steven Dirkse
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) -