I am new to R..hence this basic question. I cant get the last line of code to work. Can you take a look : )
# Importing an Excel CSV file
initial_import <- read.csv('~/my_r_studio_work/csv1.csv',header=TRUE,na.strings=c('NA','NaN','<NA>','na'))
ii_df<-data.frame(initial_import)
# Summing rows across horizontally
add_rows<-rowSums(ii_df[,3:5],na.rm=TRUE)
# Attaching this rowsum total to a column
ii_df_addrow<-cbind(ii_df,add_rows)
# Summing all columns
sumcolumns<-colSums(ii_df_addrow[,3:6],na.rm=TRUE)
# Attaching these columns totals to ii_df_addrow data frame
attach_col_tots<-rbind(ii_df_addrow,sumcolumns)
The last line of this code throws and an error..I don't know how to fix it..Any suggestions?