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
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
. 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
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
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
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
.
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
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
?
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
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
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
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
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
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
, 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
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
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
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
” 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
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
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
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
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
).
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
-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
, 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
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
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
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
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
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
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
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
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
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
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
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
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
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
.
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
. 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
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
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
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
?
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
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
, 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
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
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
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
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
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
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
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:
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
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
() 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
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
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
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
60 matches
Mail list logo