Skip to content

Re-grouping data in R

3 messages · Abraham Mathew, David L Carlson, Rui Barradas

#
Your first command erases all the data in that column:

dat$final_purchase_amount<- NA

so when you refer to it later, it consists of only NAs.

----------------------------------------------
David L Carlson
Associate Professor of Anthropology
Texas A&M University
College Station, TX 77843-4352
#
Hello,

Inline.

Em 07-08-2012 19:56, Abraham Mathew escreveu:
Fortunately not! You have started by setting the entire column vector to 
NA in your first instruction above, then try several times to find that 
vector of NAs %in%  levels numbers c(8,9, ...etc...) or c(22,23, ...etc..).
Your first line of code makes everything else relative to 
dat$final_purchase_amount useless. (I believe that that line should be 
deleted.)

Hope this helps,

Rui Barradas