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
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
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
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
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
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
'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@
> >
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
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
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
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
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] <
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
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
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
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
"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.
_
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
“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
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
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
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
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
).
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
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
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
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
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
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.
_
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
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
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
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,
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
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
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
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
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
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
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
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.
__
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
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
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
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
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
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.
__
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
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
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
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
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
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:
http://r.789695.n4.nabble.com/Package-or-procedure-recommendations-for-ana
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
return
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
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.
_
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
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
60 matches
Mail list logo