Re: [R] Problem connecting to database via RPostgreSQL/RS-DBI: could not connect error

2014-02-16 Thread andrewH
Hi Christian, thanks for responding! I wrote a reply to you when i first saw your post, but it looks like it didn't get to the list somehow. I'm still in Windows XP, though I imagine I'll have to switch over to 7 or something soon. soon. I think you are right - the problem is that I have not been

Re: [R] Problem connecting to database via RPostgreSQL/RS-DBI: could not connect error

2014-02-05 Thread andrewH
of this list and the various Stack Exchange lists, which have made possible such learning as I have been able to accomplish. Like the glaciers, my progress is slow but inexorable. Or so I like to believe. Warmest regards, andrewH -- View this message in context: http://r.789695.n4

[R] Problem connecting to database via RPostgreSQL/RS-DBI: could not connect error

2014-01-31 Thread andrewH
. That seems to imply that the local database RPostgreSQL connects to must be in a location where R puts it. So I am missing something, but I do not know what. I am running R 3.0.2 through RStudio on a Windows XP 32-bit machine. Any help anyone could offer would be greatly Warmest regards, andrewH

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

2014-01-28 Thread andrewH
was unsuccessful. I would be grateful if someone would point me toward such a package or packages if they exist. Warmest regards, andrewH __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

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

2014-01-28 Thread andrewH
On Jan 28, 2014 at 8:56pm, David Winsemius wrote: On Jan 28, 2014, at 8:43 PM, andrewH wrote: Hi Folks! I have been writing a small set of utilities for dealing with files that are hard to open correctly for one reason or another, especially because they are too big for memory, non

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

2013-12-29 Thread andrewH
Dear Bill-- I have seen it most often in functions that are defined or used inside of other functions, and need an argument from the calling function. So I have, purely as a matter of imitation, taken to doing it when I am writing a function that wants an argument of the calling function passed

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

2013-12-29 Thread andrewH
. andrewH -- View this message in context: http://r.789695.n4.nabble.com/What-purpose-is-served-by-reflexive-function-assignments-tp4682794p4682818.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

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

2013-12-29 Thread andrewH
Dear David-- Thanks so much for your helpful reply! David Winsemius wrote: The LHS X becomes a name, the RHS X will be looked up in the calling environment and fails if no value is positionally matched and then no X is found (at the time of the function definition. Does X really have to exist

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

2013-12-29 Thread andrewH
? Many thanks! --andrewH plangfelder wrote On Sat, Dec 28, 2013 at 7:27 PM, Andrew Hoerner lt; ahoerner@ gt; wrote: 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

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

2013-12-29 Thread andrewH
it to return the number -1: x-1 y-2 foo- function(x=x,y=y){x-y} foo() Thanks so much for your time and attention! andrewH Ista Zahn wrote On Sat, Dec 28, 2013 at 10:27 PM, Andrew Hoerner lt; ahoerner@ gt; wrote: Let us suppose that we have a function foo(X) which is called inside another

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

2013-12-29 Thread andrewH
Dear Bill-- I have figured out that my original question and my most recent response to you were largely nonsensical bits of idiocy. Please do not trouble yourself with them further. But I do thank you most sincerely for your time and attention. andrewH -- View this message in context

Re: [R] The Stoppa distribution

2013-12-15 Thread andrewH
Thanks enormously, Bill! I'll run with this for a while, and let you know how it works for me. Yours, andrewH -- View this message in context: http://r.789695.n4.nabble.com/The-Stoppa-distribution-tp4682171p4682254.html Sent from the R help mailing list archive at Nabble.com

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

2013-12-15 Thread andrewH
Thanks, Earl. Your utility ran like a charm, and confirmed that my effort to adapt Enrico's code to this purpose had not gone astray, which is to say, I found no funky characters. Your help is greatly appreciated. Sincerely, andrewH On Tue, Dec 10, 2013 at 7:35 AM, Earl F Glynn [via R] ml-node

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

2013-12-09 Thread andrewH
environment, in case that makes a difference. Any help anyone could offer would be greatly appreciated. Sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/How-can-I-find-nonstandard-or-control-characters-in-a-large-file-tp4681896.html Sent from the R help mailing list

[R] filehash error in the colbycol method for as.data.frame from a large object

2013-11-23 Thread andrewH
, on a Widows XP machine with Service Pack 3. Sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/filehash-error-in-the-colbycol-method-for-as-data-frame-from-a-large-object-tp4681052.html Sent from the R help mailing list archive at Nabble.com

[R] Learning the R way – A Wish

2013-03-04 Thread andrewH
them explained in detail. Warmest regards to all, andrewH -- View this message in context: 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-project.org

[R] Sparse dataframes?

2013-01-15 Thread andrewH
no if that is the truth) would be greatly appreciated. Sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Sparse-dataframes-tp4655614.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r

[R] Using factor variables with overlapping categories

2012-11-27 Thread andrewH
to the methodology literature if there is one. Any help or suggestions would be greatly appreciated. Thanks! andrewH -- View this message in context: http://r.789695.n4.nabble.com/Using-factor-variables-with-overlapping-categories-tp4651054.html Sent from the R help mailing list archive at Nabble.com

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

2012-11-27 Thread andrewH
” and “the search path”, I am not sure what function the numeral 1 in these expression serves. Why do I want to look in the global environment rather than the current environment? I also can not find anything that explains what the default “pos = -1” does. Thanks for responding! andrewH -- View

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

2012-11-27 Thread andrewH
in the previous paragraph, even if it has nothing to do with executing strings. Warmest regards, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Can-you-turn-a-string-into-a-working-symbol-tp4648343p4651073.html Sent from the R help mailing list archive at Nabble.com

[R] Making part of a data frame into a time series

2012-11-21 Thread andrewH
appreciated. Sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Making-part-of-a-data-frame-into-a-time-series-tp4650392.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] Getting information encoded in a SAS, SPSS or Stata command file into R.

2012-11-14 Thread andrewH
Dear Anthony – On closer examination, what I am talking about is not factor levels, but something different (but analogous). The data that is categorical all has integer codes, so the file is entirely numeric. The SAS proc format then gives text strings for each code for each categorical

Re: [R] Getting information encoded in a SAS, SPSS or Stata command file into R.

2012-11-13 Thread andrewH
Wow! After reading Jan's post, I said Great, I'll do that, because it was the closest to what I originally had in mind. Then I read Ista's post, and said I think I'l try that first, because it got me back on the track of following directions in the R Data Import/Export manual. Then I read

[R] Getting information encoded in a SAS, SPSS or Stata command file into R.

2012-11-12 Thread andrewH
). Any help or suggestions anyone could offer would be very much appreciated. Warmest regards, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Getting-information-encoded-in-a-SAS-SPSS-or-Stata-command-file-into-R-tp4649353.html Sent from the R help mailing list archive

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

2012-11-03 Thread andrewH
-function Looking forward to hearing from y'all.--andrewH -- View this message in context: http://r.789695.n4.nabble.com/Can-you-turn-a-string-into-a-working-symbol-tp4648343.html Sent from the R help mailing list archive at Nabble.com. __ R

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

2012-11-03 Thread andrewH
, neither one seems to work on the left hand side of a -, a -, or an =. Again, my thanks.--andrewH -- View this message in context: http://r.789695.n4.nabble.com/Can-you-turn-a-string-into-a-working-symbol-tp4648343p4648365.html Sent from the R help mailing list archive at Nabble.com

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

2012-11-03 Thread andrewH
looking for a function that produces an output that is fully equivalent to the string without quotation marks. Or for a definite statement that no such function can exist. Thanks so much for your attention to this problem. andrewH -- View this message in context: http://r.789695.n4.nabble.com

Re: [R] replacing ugly for loops

2012-10-11 Thread andrewH
Regards, AndrewH -- View this message in context: http://r.789695.n4.nabble.com/replacing-ugly-for-loops-tp4645821p4645914.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] replacing ugly for loops

2012-10-10 Thread andrewH
is why I started with a split()), and the inner loop (indexed with j) into some cute recursive function, but I was not able to do so. If anyone could suggest some nicer (e.g. shorter, or faster, or just more sophisticated) way to do this instead, I would be most grateful. Sincerely, andrewH

[R] Importing a complex XML file (SDMX format)

2011-12-12 Thread andrewH
would be very grateful for advice on either reading an arbitrary but complex XML file or from anyone who has succeeded in opening an XML file in SDMX format. Warmest regards, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Importing-a-complex-XML-file-SDMX-format

[R] Consistant test for NAs in a factor when exclude = NULL?

2011-10-26 Thread andrewH
running R 2.13.2 on Windows XP with ServicePack 3 Any assistance would be greatly appreciated. Appreciatively, andrewH Example #1 # Origin: is.na()- Exclude: NULL KK - factor(c(A,A,B,B,C,C), exclude=NULL) KK[KK==C] [1] C C Levels: A B C is.na(KK[KK==C]) - TRUE KK [1] AABBNA

Re: [R] Consistant test for NAs in a factor when exclude = NULL?

2011-10-26 Thread andrewH
there because I put them there myself. That is why I am looking for help. Does this make sense? Warmest regards, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Consistant-test-for-NAs-in-a-factor-when-exclude-NULL-tp3942755p3943157.html Sent from the R help mailing list

[R] re coercing data frame rows to character: Am I right that this is a bug?

2011-10-21 Thread andrewH
to be wrong: as.character(AA[1,]) [1] 3 1 Shouldn't it be: [1] 3 x to be consistant with the normal pattern of coercing factors to character values? If it is a bug, is this the right place to post it? sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/re-coercing

Re: [R] reporting multiple objects out of a function

2011-10-07 Thread andrewH
environments work and/or best practice in programming with them, I'd be pleased to read it. Again, many thanks. and on to classes. Warmly, andrewH -- View this message in context: http://r.789695.n4.nabble.com/reporting-multiple-objects-out-of-a-function-tp3873380p3881118.html Sent from the R

[R] Unexpected behavior of extract (`[`) or sapply functions

2011-10-07 Thread andrewH
or suggestions would be greatly appreciated. Sincerely, andrewH # Test Data test.df - data.frame(AA=rep(LETTERS[1:2], c(6,6)),BB=rep(LETTERS[3:5], c(4,4,4)), CC=rep(LETTERS[6:9],c(3,3,3,3)), DD=c(1:12)) # The function getLevels - function(data.df, factor.cols, data.col

Re: [R] reporting multiple objects out of a function

2011-10-05 Thread andrewH
would do the job. Like: fun1 - function(x, y, z) eval.parent{obj1 - x; obj2 - y; obj3 - z }) Or does that just use the parent environment for the inputs, not the output? Part of my problem is that I am not sure how to tell if I have succeeded. Otherwise I would just test it myself. andrewH

Re: [R] reporting multiple objects out of a function

2011-10-05 Thread andrewH
it, my results were the same as paulFun: assigned in the global environment, but not in the calling environment. Setting n = 0 seemed to limit the assignment to the interior of andrewFun: none of the printed obj values were affected. Help? andrewH -- View this message in context: http://r

[R] reporting multiple objects out of a function

2011-10-04 Thread andrewH
be greatly appreciated – either on the necessary code, or on how to search for it, or a reference to a good discussion of this family of problems. Sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/reporting-multiple-objects-out-of-a-function-tp3873380p3873380.html Sent

Re: [R] Referring to an object by a variable containing its name: 6 failures

2011-09-18 Thread andrewH
practice if that practice should always be avoided. For cognative dissonance form authority conflicts, that's up there with the Google R stylesheet saying to avoid using S4 classes. Again, my thanks. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Referring-to-an-object

Re: [R] Referring to an object by a variable containing its name: 6 failures

2011-09-17 Thread andrewH
. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Referring-to-an-object-by-a-variable-containing-its-name-6-failures-tp3817129p3819813.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

[R] Name the dots! (...)

2011-09-17 Thread andrewH
. In fact, you can use data.frame instead of list to get a named argument list, but only if all your objects are of the same length. Thanks in advance for any help you can offer. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Name-the-dots-tp3819947p3819947.html Sent from the R

Re: [R] Returning the name of an object passed directly or from a list by lapply

2011-09-16 Thread andrewH
all but the first variable passed by Thanks so much for your thoughtful help. andrewH testX - function(objectX, bar=TRUE) {# A useful diagnostic function object.name - deparse(substitute(objectX)) if(bar) cat(##\n); cat(testX(, object.name

[R] Returning the name of an object passed directly or from a list by lapply

2011-09-15 Thread andrewH
help you can offer would be greatly appreciated. Warmly, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Returning-the-name-of-an-object-passed-directly-or-from-a-list-by-lapply-tp3816798p3816798.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Returning the name of an object passed directly or from a list by lapply

2011-09-15 Thread andrewH
it is. Any suggestions from any quarter would be deeply appreciated. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Returning-the-name-of-an-object-passed-directly-or-from-a-list-by-lapply-tp3816798p3817116.html Sent from the R help mailing list archive at Nabble.com

[R] Referring to an object by a variable containing its name: 6 failures

2011-09-15 Thread andrewH
? Although I'm hoping others will find the bald look caused by tearing my hair out to be attractive, I would appreciate any assistance you can offer in understanding this question. Warmly, andrewH testDFcols - function(data.df, select=c(1:ncol(data.df)), bar=TRUE) {# A useful summary function

Re: [R] Reading R Code aloud

2011-09-14 Thread andrewH
on, perhaps to parents everywhere. Peace, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Reading-R-Code-aloud-tp3811142p3813540.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https

[R] Reading R Code aloud

2011-09-13 Thread andrewH
, but perhaps I do not know how best to look. Does anyone know of any? Warmly, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Reading-R-Code-aloud-tp3811142p3811142.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r

Re: [R] Searching the console

2011-09-08 Thread andrewH
Thanks, Josh! I'm using TINN-R now, but I have been thinking of switching to ESS. Though perhaps TINN-R has a similar function -- I had been looking for consol functions, rather than editor functions. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Searching-the-console

[R] Consistently printing the name of an object passed to a function; a data-auditing question

2011-09-08 Thread andrewH
to hear any useful advice about how to accelerate this stage of a project, and get more quickly to its statistical heart. Most sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Consistently-printing-the-name-of-an-object-passed-to-a-function-a-data-auditing-question

Re: [R] Searching the console

2011-09-08 Thread andrewH
messages, or all the occurrences of some variable or function that seems to be causing a problem. In both cases I want to find the result in context. Is that clearer? Thanks for your attention. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Searching-the-console

Re: [R] Searching the console

2011-09-08 Thread andrewH
to do it from the console itself, or otherwise cut out manual steps. Warmly, andrewH -- View this message in context: http://r.789695.n4.nabble.com/Searching-the-console-tp3797884p3799630.html Sent from the R help mailing list archive at Nabble.com. __ R

[R] Searching the console

2011-09-07 Thread andrewH
Is there any way to search the console during an interactive session? I've looked and looked, and can not find one. In some add-on package, maybe? Sorry to be so basic, but help would be greatly appreciated. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Searching

[R] Can you send side effect text into a variable?

2011-08-15 Thread andrewH
Dear folks -- There are a number of functions -- I am thinking of str() as an example -- that produce text as a side-effect, rather then returning it. Is there any way to send the text produced by such functions into a character variable? Any suggestions would be greatly appreciated. andrewH

Re: [R] Package or procedure recommendations for analysis of repeated cross-sections?

2011-07-26 Thread andrewH
OK, Ive done more research, and I think that what I am looking for is repeated cross section or pseudo-panel estimators. Does anyone know if these have been implimented inany r package? -- View this message in context:

[R] Package or procedure recommendations for analysis of repeated cross-sections?

2011-07-25 Thread andrewH
that, like many with a superficial knowledge of econometrics, I tend to see every research question in terms of OLS or GLM, even if that is not the right model for the problem. Any help or suggestions would be greatly appreciated. Sincerely, andrewH -- View this message in context: http://r

Re: [R] Using str() in a function.

2011-07-15 Thread andrewH
Thanks, everybody, this has been very edifying. One last question: It seems that sometimes when a function returns something and you don't assign it, it prints to the console, and sometimes it doesn't. I'm not sure I understand which is which. My best current theory is that, if the function

Re: [R] Using str() in a function.

2011-07-13 Thread andrewH
() invisible. But invisible(str(X)) is the last expression evaluated, so why does the side-effect printing of str() results happen last instead of first? and thanks again! andrewH -- View this message in context: http://r.789695.n4.nabble.com/Using-str-in-a-function-tp3655785p3666339.html Sent from the R

Re: [R] Using str() in a function.

2011-07-13 Thread andrewH
the second one is invisible. Still puzzled by the order of my output, though. andrewH -- View this message in context: http://r.789695.n4.nabble.com/Using-str-in-a-function-tp3655785p3666543.html Sent from the R help mailing list archive at Nabble.com. __ R

Re: [R] Using str() in a function.

2011-07-13 Thread andrewH
the return() first. If it does the return(str(X)) when it encounters it, (1) why doesn't it send the summary() to the console (I'm guessing that it is because its output is local to the function), and (2) why doesn't it return the NULL that str() returns to the console? again, thanks. --andrewH

[R] Using str() in a function.

2011-07-09 Thread andrewH
Using str() in a function. I am in the early phase of learning R, and I find I spend a lot of time trying to figure out what is actually in objects I have created or read in from a file. I'm trying to make a simple little function to display a couple of things about a object, let's say the