I know it is a basic quaestion but couldnt find any solution to it. I want to multiply all columns of a dataframe by single column.
df1<-data.frame(F1=c(1
Another solution is sweep(df1, 1, C$C, `*`), which means "sweep out" the statistic represented by C$C from each column of df1 by multiplication.
sweep(df1, 1, C$C, `*`)
C$C
df1