Displaying 1 result from an estimated 1 matches for "14000l".
Did you mean:
1000l
2010 Feb 16
1
Total and heading of portfoilo table
...Y = read.csv('equity_price.csv')
I have tried the loop
Z = array()
for (i in 1:2)
{
Z[i] = (X[[i]]*Y[i])
}
# When I write this dataframe as
write.csv(data.frame(Z), 'Z.csv', row.names = FALSE)
When I open 'Z.csv' file, I get
c.2500L..3300L..4500L..1000L..4400L. c.14000L..45000L..48000L..26000L..15000L.
2500 14000
3300 45000
4500 48000
1000 26000
4400 15000
My requirement is to have the column heads and the portfolio total as
GOOG YHOO Total
2500 14000 16500
3300 45000 48300
4500 48000 52500
1000 ...