similar to: Logical "in" test

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
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
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 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
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
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)
2017 Dec 17
1
Region subtag in package 'Language' field
I am looking for the appropriate field to let package authors to declare the pkg documentation language for spell checkers. The most important case is to specify a preference between "en-US" or "en-GB" which can be used by the hunspell or spelling pkg to select the appropriate dictionary. WRE defines the "Language" field for documentation language, but from the
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) -
2009 Apr 02
1
Updating a data frame
Folks, Updating values in a table is simple in SAS or SQL, but I've wracked my brain looking for an elegant solution in R to no avail thus far. Certainly this is a common need that's been solved in dozens of different ways. Given an initial dataframe nn and a smaller dataframe of updates uu, I'd like to replace the values in nn <- expand.grid('a'=1:4, 'b'=1:3)
2020 Sep 08
2
some questions about R internal SEXP types
On Tue, 2020-09-08 at 12:08 +0200, Tomas Kalibera wrote: > I am not sure if I understand correctly, but if you were accessing > directly the memory of SEXPs from Go implementation instead of > calling > through exported access functions documented in WRE, that would be a > really bad idea. Of course fine for research and experimentation, but > the internal structure can and does
2020 Sep 06
8
some questions about R internal SEXP types
Hello, I am writing an R/Go interoperability tool[1] that work similarly to Rcpp; the tool takes packages written in Go and performs the necessary Go type analysis to wrap the Go code with C and R shims that allow the Go code to then be called from R. The system is largely complete (with the exception of having a clean approach to handling generalised attributes in the easy case[2] - the less
2015 Apr 25
2
Title case in DESCRIPTION for package where a word is a function namei
> On 25 Apr 2015, at 13:11 , Prof J C Nash (U30A) <nashjc at uottawa.ca> wrote: > > Hendrik pointed out it was the parentheses that gave the complaint. > Single quotes and no parentheses seem to satisfy R CMD check. Perhaps > that needs to be in the WRE. Well, it is in ?toTitleCase: ...However, unknown technical terms will be capitalized unless they are single
2015 Apr 24
3
Title case in DESCRIPTION for package where a word is a function name
On 24.04.2015 22:44, Ben Bolker wrote: > Prof J C Nash (U30A <nashjc <at> uottawa.ca> writes: > >> >> I was preparing a fix for a minor glitch in my optimx package and R CMD >> check gave an error that the title was not in title case. > > [snip] to make Gmane happy ... > >> I have found >> >> A Replacement and Extension of the