I'm very new to R and just finding my way, so be gentle!
I've hit a swift halt doing some summary statistics on a simple continuous data field, divided into two categories. I'm getting the following error message. I am unclear why length(names(tth$Mins.to.hospital)) is zero and how to alter this. This is preventing me from carrying the summary data forward to any further analyses, which I need to create some new variables to account for the missing data points.
I'm sure this is a very simple error, and I apologise for asking!
Lynn
The output is below - I have the epicalc program loaded.
aggregate(tth$Mins.to.hospital, by=list(DIRECT=tth$JR.1st.hospital))
Note:
Missing values removed.
DIRECT count.. sum.. mean.. median.. sd.. min.. max.$
1 No 76 202607 2665.8816 630 5297.410 217 26495
2 Yes 319 57859 181.3762 70 1314.982 0 23180
Warning messages:
1: In names(y)[length(names(y))] <- paste("count", as.character(substitute(x)), :
number of items to replace is not a multiple of replacement length
2: In names(y)[length(names(y))] <- paste(FUN[i], as.character(substitute(x)), :
number of items to replace is not a multiple of replacement length
3: In names(y)[length(names(y))] <- paste(FUN[i], as.character(substitute(x)), :
number of items to replace is not a multiple of replacement length
4: In names(y)[length(names(y))] <- paste(FUN[i], as.character(substitute(x)), :
number of items to replace is not a multiple of replacement length
5: In names(y)[length(names(y))] <- paste(FUN[i], as.character(substitute(x)), :
number of items to replace is not a multiple of replacement length
6: In names(y)[length(names(y))] <- paste(FUN[i], as.character(substitute(x)), :
number of items to replace is not a multiple of replacement length
7: In names(y)[length(names(y))] <- paste(FUN[i], as.character(substitute(x)), :
number of items to replace is not a multiple of replacement length
[1] "Time.to.hospital.arrival.present.only" "Mins.to.hospital" "JR.1st.hospital"
length(names(tth$Mins.to.hospital))
length(paste("Count", as.character(substitute(tth$JR.1st.hospital))))
[1] 3
[[alternative HTML version deleted]]