On May 29, 2014 9:45 PM, Stephen Meskin actu...@umbc.edu wrote:
Thanks Greg for your response. Is there a work around?
A work around for what?
Of course this begs the question as to Why is attach part of the sample
session in App. A of the introductory manual?
Because people find it
If you pay attention and are careful not to use any variables names
that conflict then you do not need a work around (and the conflicts
function can help you see if there are any conflicts that you may need
to worry about).
Probably the best work around is to use the with or within function
Greg, Ista, (or anyone else),
Let me take one last run at this problem.
Consider the following extract from the Appendix A text:
x - 1:20
w - 1+sqrt(x)/2
dummy - data.frame(x=x, y=x+rnorm(x)*w)
fm - lm(y~x, data=dummy)
fm1 - lm(y~x, data=dummy, weight=1/w^2)
attach(dummy)
/Make the
Hi Stephen,
See in line.
On Fri, May 30, 2014 at 4:18 PM, Stephen Meskin actu...@umbc.edu wrote:
Greg, Ista, (or anyone else),
Let me take one last run at this problem.
Consider the following extract from the Appendix A text:
x - 1:20
w - 1+sqrt(x)/2
dummy - data.frame(x=x,
1. If you create a variable x or w or dummy, it is stored in the current
environment. You can refer to it by the name x or w or dummy. If you create a
column x in the data frame dummy, you can refer to it as dummy$x or
dummy[[x]]. That is a different x than the variable x in your current
While following the suggestion in the manual An Introduction to R to
begin with Appendix A, I ran into the problem shown below about 3/4 of
the way down the 1st page of App. A.
After using the function /attach/, I did not get visible columns in the
data frame as indicated but the rather
This is a warning and in your case would not be a problem, but it is
good to think about and the reason why it is suggested that you avoid
using attach and be very careful when you do use attach. What is
happening is that you first created a vector named 'x' in your global
workspace, you then
Thanks Greg for your response. Is there a work around?
Of course this begs the question as to Why is attach part of the sample session
in App. A of the introductory manual? All the commands are directly from App.
A. Is it possible the configuration of R on my computer is not in accord with
8 matches
Mail list logo