[R] "With" question
David Arnold
dwarnold45 at suddenlink.net
Tue Sep 17 23:33:32 CEST 2013
All,
Trying to avoid using attach and detach while teaching class in Intro Stats.
data=read.delim("dataset1.dat",header=TRUE)
with(data,{
sort(age)
length(age)
(age[10]+age[11])/2
})
However, this code only produces output for the last line between the curly
braces. Granted, as we type the lines in one at a time and execute the code,
we'll see each output. And, we can fix the problem by adding a print to each
line.
Wonder if there are any other suggestions?
David
--
View this message in context: http://r.789695.n4.nabble.com/With-question-tp4676379.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list