Skip to content
Prev 102780 / 398500 Next

Excel files

ramelan thiagarajah <ramelan3 at yahoo.co.uk> writes:
First, assign your data frame to a variable:

Tr1 <- read.xls( rfile, colNames = TRUE, sheet = 1, 
                     type = "data.frame", from = 1 )

then 

mean(Tr1$x)

or

with(Tr1, mean(x))

or

attach(Tr1)
mean(x)

Did you study the "An Introduction to R" manual that ships with the
software?