search for: stanhopkin

Displaying 4 results from an estimated 4 matches for "stanhopkin".

Did you mean: stanhopkins
2007 Jun 04
3
Extracting lists in the dataframe $ format
I'm new to R and am trying to extract the factors of a dataframe using numeric indices (e.g. df[1]) that are input to a function definition instead of the other types of references (e.g. df$out). df[1] is a list(?) whose class is "dataframe". These indexed lists can be printed successfuly but are not agreeable to the plot() and lm() functions shown below as are their df$out
2007 Sep 04
1
data.frame loses name when constructed with one column
Not sure why the data.frame function does not capture the name of the column field when its being built with only one column. Can anyone help? > data out pred1 predd2 1 1 2.0 3.0 2 2 3.5 5.5 3 3 5.5 11.0 > data1=data.frame(data[,1]) > data1 data...1. 1 1 2 2 3 3 > data1=data.frame(data[,1:2]) > data1 out pred1 1 1 2.0 2 2
2007 Jul 24
3
Redirecting print output
I see a rich set of graphic device functions to redirect that output. Are there commands to redirect text as well. I have a set of functions that execute many linear regression tests serially and I want to capture this in a file for printing. Thanks, Stan Hopkins [[alternative HTML version deleted]]
2007 Jul 28
1
Error when using the cat function
Is the following developed in my console output a recognized bug or am I using the cat function incorrectly? Thanks, Stan > ifelse(class(data[[n]])!="factor",{print("yes")},{print("no")}) [1] "yes" [1] "yes" > ifelse(class(data[[n]])!="factor",{cat("yes")},{cat("no")}) yesError in ans[test & !nas] <-