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
isheartening that I am spending so much time being just that. Still, I am very grateful for the help and support 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. O

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

2014-01-31 Thread andrewH
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 -- View this message in context: http://r.789695.n4.nabble.com/Problem-connecting-to-database-via-RPostgreSQL-RS-DBI-could-not-connect-error-tp4684534.html

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

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

2014-01-28 Thread andrewH
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] 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] What purpose is served by reflexive function assignments?

2013-12-29 Thread andrewH
'x' is missing " error in x-y. I expected 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 < > ahoerner@ > >

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

2013-12-29 Thread andrewH
s is "just say no". Is that more or less right? Many thanks! --andrewH plangfelder wrote > On Sat, Dec 28, 2013 at 7:27 PM, Andrew Hoerner < > ahoerner@ > > wrote: >> Let us suppose that we have a function foo(X) which is called inside >> another fu

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 exis

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

2013-12-29 Thread andrewH
first. My apologies. 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 ma

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 t

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] <

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 Nabbl

[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
ing this problem, or what my next diagnostic step should be? Please be aware that I can only do things I can run on 3 gig of ram. I am running R under RStudio 0.97.551, on a Widows XP machine with Service Pack 3. Sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble

[R] Learning the R way – A Wish

2013-03-04 Thread andrewH
that uses 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

[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. _

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

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

2012-11-27 Thread andrewH
“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 this

[R] Using factor variables with overlapping categories

2012-11-27 Thread andrewH
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

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

2012-11-21 Thread andrewH
instead of the one I handed to it? And if so, why? Offers of help or insight greatly 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 a

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 variable

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 Anth

[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 at

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

2012-11-03 Thread andrewH
DD [1] 1 2 3 So I am still 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 contex

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

2012-11-03 Thread andrewH
ver, 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] Can you turn a string into a (working) symbol?

2012-11-03 Thread andrewH
his, but it does not. > as.symbol (xx[1])*as.symbol (xx[2])(r) Error: attempt to apply non-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-s

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
er, or just more sophisticated) way to do this instead, I would be most grateful. Sincerely, andrewH -- View this message in context: http://r.789695.n4.nabble.com/replacing-ugly-for-loops-tp4645821.html Sent from the R help mailing list archive at Nabble.com. _

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

2011-12-12 Thread andrewH
cratch. I 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-S

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

2011-10-26 Thread andrewH
the NAs that I knew were 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 fro

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

2011-10-26 Thread andrewH
ample 1. I'm 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&q

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

2011-10-20 Thread andrewH
s.character(AA[,2]) [1] "x" "y" But this seems to me 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,

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

2011-10-07 Thread andrewH
Any help 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(d

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

2011-10-06 Thread andrewH
a favorite introduction to how R 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-tp387

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

2011-10-05 Thread andrewH
ow I am even more deeply confused. Here is a function that I thought would do what I want: andrewFun <- function() { assign("obj1", 5, pos = sys.parent(n = 1)) assign("obj2", 6, pos = sys.parent(n = 1)) NULL } However, when I tried it, my results were the same as paulFun: ass

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 myse

[R] reporting multiple objects out of a function

2011-10-04 Thread andrewH
d 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 Sen

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

2011-09-18 Thread andrewH
ity as Venables et al. would recomend a programming 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

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

2011-09-17 Thread andrewH
e command does. 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

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

2011-09-17 Thread andrewH
welcome. --and thanks again for all the help. 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. __

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

2011-09-16 Thread andrewH
his problem nicely.) [s]ubstitute seems to drop 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

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

2011-09-15 Thread andrewH
ect itself? 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 usefu

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

2011-09-15 Thread andrewH
ure don't know what 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 mail

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

2011-09-15 Thread andrewH
ether it is handed the name directly or by lapply as an element of a list? Any 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-tp3816798p38167

Re: [R] Reading R Code aloud

2011-09-14 Thread andrewH
catches 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

[R] Reading R Code aloud

2011-09-13 Thread andrewH
any on ten minutes search, 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. __

Re: [R] Searching the console

2011-09-08 Thread andrewH
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

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

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

2011-09-07 Thread andrewH
tX is the actual object that the name refers to, and not the name or the reference, in both cases? Finally, and this should maybe be another post, I'd love to hear if others have thought through the whole question of efficient data auditing. Is there a suite of tools, or a standard set of re

Re: [R] Searching the console

2011-09-07 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-co

[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/Searchin

[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: http://r.789695.n4.nabble.com/Package-or-procedure-recommendations-for-ana

[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 return

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

2011-07-13 Thread andrewH
the NULL that str() returns to the console? again, thanks. --andrewH -- View this message in context: http://r.789695.n4.nabble.com/Using-str-in-a-function-tp3655785p316.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

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

2011-07-13 Thread andrewH
LL, because 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. _

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

2011-07-13 Thread andrewH
NULL? 2. My function, above, makes the NULL value returned by str() 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.n

[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 summar