[R] studentized deleted residuals and NA's

2004-04-05 Thread John Miyamoto
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

[R] Job notice at the University of Washington

2003-10-14 Thread John Miyamoto
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,

[R] Thanks re Combining the components of a character vector

2003-04-04 Thread John Miyamoto
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

[R] Combining the components of a character vector

2003-04-03 Thread John Miyamoto
] " 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

[R] Summary: extracting the names of the dataframe and variables

2003-03-23 Thread John Miyamoto
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"

[R] extracting the names of the dataframe and variables in aov or lm

2003-03-22 Thread John Miyamoto
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

Re: [R] pasting "\" into character strings

2002-12-22 Thread John Miyamoto
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

Re: [R] pasting "\" into character strings

2002-12-22 Thread John Miyamoto
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

[R] pasting "\" into character strings

2002-12-22 Thread John Miyamoto
;, 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

[R] Summary: vectorizing test for equality

2002-12-20 Thread John Miyamoto
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

[R] vectorizing test for equality

2002-12-20 Thread John Miyamoto
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 ---