[R] The stages of standard function evaluation

2018-05-02 Thread Andrew Hoerner
places where I am by no means certain that my interpretation is correct. I have highlighted some of these below with a “??”. I look forward to learning from you. Warmest regards, J. Andrew Hoerner ** Standard function recognition:* recognizing some or all of a string code as a function. (Part of

Re: [R] Selecting rows from a DF where the value in a selected column matches any element of a vector.

2014-04-12 Thread Andrew Hoerner
, "E6000US0600153000") & > EC07_A1$SECTOR %in% c("32", "33", "42", 44", 45", 51", 54", 61", > "71", > "81"), ] > > (Note that your original code snippet had a shortage of ) and didn't &g

[R] Fwd: Selecting rows from a DF where the value in a selected column matches any element of a vector.

2014-04-12 Thread Andrew Hoerner
n% c("32", "33", "42", 44", 45", 51", 54", 61", > "71", > "81"), ] > > (Note that your original code snippet had a shortage of ) and didn't > specify the data frame from which to take the columns.) > >

[R] Selecting rows from a DF where the value in a selected column matches any element of a vector.

2014-04-12 Thread Andrew Hoerner
gest an alternative that would achieve my ends. Oh, and I would add, if there is a way of correctly using doing this with the extract function [], I would like to know what it is. If not, I guess I'd like to know that too. Sincerely, Andrew Hoerner -- J. Andrew Hoerner Director, Sustainable Econo

Re: [R] Diagnostic and helper functions for defective & hard-to-import files

2014-01-29 Thread Andrew Hoerner
ring out how to read an unknown file type. > > The showNonASCII and showNonASCIIFile functions in the tools package are > also helpful. > > I don't know of other examples. > > Duncan Murdoch > > -- J. Andrew Hoerner Director, Sustainable Economics Program Redefining

Re: [R] RSQLite: Tracking an error message to its source

2014-01-11 Thread Andrew Hoerner
You can attach > others using the ATTACH command > (http://www.sqlite.org/lang_attach.html). > > Hadley > -- > http://had.co.nz/ > My goodness. You took that all the way from frustrating nonsense to sensible and obvious with a single line of explanation. A little breathless, andrew

Re: [R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Andrew Hoerner
command <-paste("CREATE INDEX IF NOT EXISTS ", DBname_c, "_", > indexName_c, " ON ", yourTable_c, " (", > paste(indexVars_C, collapse=", "), ")", sep='') > } > > Best, > I

Re: [R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Andrew Hoerner
Andrew Hoerner rprogress.org> writes: > > Dear folks-- > I am not sure if this should be framed as a question about RSQLite, about > debugging, about SQLite, or about how to write a good question. I have a > little function (copied below beneath the error messages along with m

[R] RSQLite: Tracking an error message to its source

2014-01-04 Thread Andrew Hoerner
t;INTEGER", AGE="INTEGER", RACE="INTEGER", FTOTVAL="REAL") ndxs01 <- c("HWTSUPP", "RACE") And the data in the file I am importing looks like this, but longer: "YEAR","SERIAL",

Re: [R] What purpose is served by reflexive function assignments?

2013-12-30 Thread Andrew Hoerner
ile "<-" does not? >> > > Using "=" assigns a name. Using "<-" retruns a value and whether the value > gets a name depends on the particular function. > > > foo <- function(X <- V) { print(X)} > Error: unexpected assignm

Re: [R] What purpose is served by reflexive function assignments?

2013-12-30 Thread Andrew Hoerner
Dear Bill-- Your final question has my confusion tagged exactly. Thanks so much for your time and attention! andrewH On Sun, Dec 29, 2013 at 5:47 PM, William Dunlap wrote: > On Dec 28, 2013, at 7:27 PM, Andrew Hoerner wrote: > > > Let us suppose that we have a function foo(X) whi

[R] What purpose is served by reflexive function assignments?

2013-12-28 Thread Andrew Hoerner
ould shed light on the subject. Sincerely, andrewH -- J. Andrew Hoerner Director, Sustainable Economics Program Redefining Progress (510) 507-4820 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Assigning default function arguments to themselves: Why?

2013-12-16 Thread Andrew Hoerner
Let us suppose that we have a function foo(X) which is called inside another function, bar(). Suppose, moreover, that the name "X" has been assigned a value when foo is called. I have noticed that many functions contain arguments with defaults of the form X=X. Call this reflexive assignment. How i

Re: [R] How can I find nonstandard or control characters in a large file?

2013-12-15 Thread Andrew Hoerner
1) > ## do something with lines > lines <- readLines(f, n = 1) > ## do something with lines > ## > > To find 'non-standard characters' you will need to define what > 'non-standard characters' are. But perhaps ?tools:::showNonASCII, wh

[R] The Stoppa distribution

2013-12-13 Thread Andrew Hoerner
The Stoppa distribution is a 3-parameter distribution that generalizes the Pareto distribution, adding a second shape parameter but no location term. The CDF is F(x) = [1-(x/x0)-á]è0 < x0 < x Kleiber & Kotz (2003). *Statistical Size Distributions in Econom

[R] r SIG birth, life and death

2013-12-05 Thread Andrew Hoerner
case may be - negative results are important!) of that SIG. If I learn anything useful (and not confidential) in off-list conversations or correspondence, I will summarize it and post it here. I would be most grateful for any assistance. Peace, Andrew J. Andrew Hoerner Director, Sustainable

[R] Can I find the number of subscribers to r-help and r SIG mailing lists?

2013-12-05 Thread Andrew Hoerner
dates for active SIGs. Peace, andrewH -- J. Andrew Hoerner Director, Sustainable Economics Program Redefining Progress (510) 507-4820 [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Learning the R way – A Wish

2013-03-05 Thread Andrew Hoerner
4.nabble.com/** >> Learning-the-R-way-A-Wish-**tp4660287.html<http://r.789695.n4.nabble.com/Learning-the-R-way-A-Wish-tp4660287.html> >> Sent from the R help mailing list archive at Nabble.com. >> >> __**________ >> R-help@r-

Re: [R] Learning the R way – A Wish

2013-03-05 Thread Andrew Hoerner
t: http://r.789695.n4.nabble.com/** >> Learning-the-R-way-A-Wish-**tp4660287.html<http://r.789695.n4.nabble.com/Learning-the-R-way-A-Wish-tp4660287.html> >> Sent from the R help mailing list archive at Nabble.com. >> >> __** &

Re: [R] Learning the R way – A Wish

2013-03-05 Thread Andrew Hoerner
nd the later, more up-to-date text > "Software for Data Analysis" to be less helpful in understanding the R/S > "internals" than the "S Programming" text. It was surprisingly sparse with > its coding examples. You could sometimes go for pages without seeing an

Re: [R] Learning the R way – A Wish

2013-03-05 Thread Andrew Hoerner
nt >> my book budget. Someday I’ll probably buy a copy, but for the time being, >> I >> am stuck without it. So it would be great to have a piece of code that >> uses >> them explained in detail. >> >> Warmest regards to all, andrewH >> >> >

Re: [R] Sparse dataframes?

2013-01-27 Thread Andrew Hoerner
; https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > -- J. Andrew Hoerner Director, Sustainable Economics Program Redefining Progress (5

Re: [R] Can you turn a string into a (working) symbol?

2012-11-28 Thread Andrew Hoerner
results back to the array, or >> to a new array. Hence my question. >> >> I’m afraid that this explanation is too long for people to read, but hope >> springs eternal. I’d be remarkably pleased and eternally grateful if I >> got >> a solution to the pro