[R] Problem with download.file ?

2015-03-27 Thread Giles Crane
# download.file() Seems to put the xlsx file onto hard drive. >download.file("http://www.udel.edu/johnmack/data_library/zipcode_centroids.xlsx";, > "zipcode_centroids.xlsx") trying URL 'http://www.udel.edu/johnmack/data_library/zipcode_centroids.xlsx' Content type 'application/vnd.openxmlformats

[R] int vector

2013-09-11 Thread Giles Crane
class int seems to interact oddly with fix() and dotchart(). Reading a .csv file when there are no decimal points in an item, results in a data.frame having a column of class int. The mode, however, is numeric. fix() does not recognize int "vectors", and thus does not spread its sheet. dotcha

[R] AOV() may misslabel random effects.

2011-03-14 Thread Giles Crane
Greetings, The aov() function may mislabel the random effects as in the example below: Has anybody else noticed this? Cordially, Giles Crane, MPH, ASA, NJPHA gilescr...@verizon.net > m2 Call: aov(formula = y ~ ap + pe + Error(ju), data = d) Grand Mean: 77.50667 Stratum 1: ju Te

[R] Behavior of assignment within system.time()

2011-03-12 Thread Giles Crane
umbers 1 to 1 However, grouping the statement with curly brackets also gives the correct system time. system.time( { x=1:1} ) # times the statement correctly Having fun with R, Giles Crane __ R-help@r-project.org mailing list https://stat.ethz.

[R] print() required sometimes in interactive use of console

2011-01-26 Thread Giles Crane
) #prints a permutation of 1 to 8 for(i in 1:5) #does not sample(1:8,8) Cordially, Giles Crane __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Loading .Rdata within an R function

2010-07-09 Thread Giles Crane
top level environment. However, I would like to load the data into the function environment, so that the data goes away when the function terminates. Cordially, Giles Crane -- View this message in context: http://r.789695.n4.nabble.com/Loading-Rdata-within-an-R-function-tp2282751p2283051.html Sen

[R] Loading .Rdata within an R function

2010-07-08 Thread Giles Crane
mydata.Rdata. } I wish to load mydata.Rdata only within the function f1. Perhaps I have misunderstood the capabilities of load(), or the environment concepts. Thank you for any help you may give. Cordially, Giles Crane -- View this message in context: http://r.789695.n4.nabble.com/Loading-Rdat

Re: [R] Adjusted means and generalized chain block designs

2010-06-24 Thread Giles Crane
To whom it may concern: I compared several R package results, and manual checked two generalized chain block design experiments. The correct adjusted treatment means can be computed by using the effects library as follows: library(effects) aov1 = aov(y~blocks+rows+trt) means.aov = a

Re: [R] renaming objects

2008-03-04 Thread Giles . Crane
G1, file = "DIAG1.Rdata") I am now testing this approach. Cordially, Giles Giles Crane, M.Phil., MPH Research Scientist & Statistician Tel 609 292-8012, -5666 Fax 609 292-9288 [EMAIL PROTECTED] __ This does not really answer your question but the following lets yo

[R] renaming objects

2008-03-03 Thread Giles . Crane
f renaming variables (columns) in dataframes, but I have found no methods for renaming objects. The functionassign() does not do this. Thank you for any help you can give. Cordially Giles Crane, M.Phil., MPH Research Scientist & Statistician New Jersey Department of Health & Senior Serv

[R] How to form a simple R package

2008-02-05 Thread Giles . Crane
Is there a function to form in one step (configure files and install) a simple R package of consisting of one script file of R functions? For example in Windows: form.package(name="mypkg", rcodefile ="c:\misc\mypkg.r" ) Thank you for any comments. Giles Giles Crane, M