machine.
John
----
John Miyamoto, Dept. of Psychology, Box 351525
University of Washington, Seattle, WA 98195-1525
Phone 206-543-0805, Fax 206-685-3157, Email [EMAIL PROTECTED]
Homepage http://faculty.washington.edu/jmiyamot/
__
[E
e and minority candidates. The University is an Equal
Opportunity/Affirmative Action employer.
John Miyamoto, Dept. of Psychology, Box 351525
University of Washington, Seattle, WA 98195-1525
Phone 206-543-0805, Fax 206-685-3157,
real source of my confusion was that I wasn't aware that arguments
following '...' must be fully specified. Now I know that this is
important. Thanks for the help.
John
John Miyamoto, Dept. of Psychology, Box 351525
U
] " Bob loves Sally"
Is there a more natural (no loop) way to do this in R?
John Miyamoto
John Miyamoto, Dept. of Psychology, Box 351525
University of Washington, Seattle, WA 98195-1525
Phone 206-543-080
efinition
tst.dat <- data.frame(Vis=rep(c(-1, 1), 8),
Cmplx=rep(rep(c(-1,1), each=2), 4),
Isi=rep(rep(c(-1,1), each=4), 2),
Rt=rnorm(16))
tst.fit <- lm(Rt ~ Vis*Cmplx*Isi, data=tst.dat)
v.names(tst.fit)
data dep.var var1 var2 var3
"tst.dat"
ut$call. The reason I am trying to extract these names is that I
want to write a general purpose function that displays descriptive
statistics and plots that are relevant to an aov or lm analysis. If I
could extract these names from previous aov or lm output, I wouldn't have
to men
t;/")[[1]]
> out.1
[1] "e:" "temp" "tmout1"
> out.2 <- paste(out.1, sep="", collapse="\\")
> out.2
[1] "e:\\temp\\tmout1"
> cat(out.3, "\n")
e:\temp\tmout1
Since out.1 is a character vector, I needed
quot;, sep="\\")
[1] "c:\\work\\part1.txt"
whereas I want "c:\work\part1.txt". Some people have suggested to try
'file.path', but it either doesn't work, or I don't know how to make it
work.
> file.path("c:","work",&qu
;, but what I'm trying to do is to
write an R function that writes references to Windows files into a text
file, where a different Windows programs will later read these references
in the standard Windows syntax.
Can someone tell me how to create the character string
'c:\work\part1.txt
ent a simple solution:
> x
[1] 2 NA 1 5 3
> x==5 & !is.na(x)
[1] FALSE FALSE FALSE TRUE FALSE
Thanks also to Brian Ripley who suggested that I look at chapter 2 of
MASS4, and Eric Lecoutre who pointed out that the 'which' function could
be useful
why the following
does not work, because it seems to me it should:
> test <- function(x) identical(x[1], x[2])
> apply(cbind(x, 5), 1, test)
[1] FALSE FALSE FALSE FALSE FALSE
I was expecting to see FALSE FALSE FALSE TRUE FALSE.
John Miyamoto
---
11 matches
Mail list logo