> apply(wanda,1,sum)will produce a vector of length m (the first dimension is preserved) whose elements are the row sums from wanda.

> fish <- apply(wanda,1,sum)The operation

> flatfish <- sweep(wanda,1,fish, "/")works on each row of wanda (1 = 'operate by rows'). It takes wanda[1,] and divides (because of the "/") it by fish[1], and so on. The vector flatfish has length m with wanda[i,]/fish[i] as its ith element.