[R] Stack smashing again.

2022-04-10 Thread Rolf Turner
To all and sundry, near and far, Ivan Krylov in particular (The latter being singled out because he was so helpful the last time I asked a question on this issue. My apologies to him if I am being a pest.) I have again been beset by a "stack smashing" problem when trying to run R c

[R] superscript of plot 2 x-mean(x) vs. (x-xmean)^2 has part of the superscript 2 cutoff.

2022-04-10 Thread Sorkin, John
I am trying to produce two plots, one of x vs x^2 and the other x-mean(x) vs. (x-mean(x))^2 using base R functions. All works well EXCEPT for the superscript of the y axis of the second plot. Half of the superscript 2 in (x-mean(x))^2 is cut off. My code follows. Any suggestions for modificat

Re: [R] Multiplying each row of data.frame by a row in another data.frame

2022-04-10 Thread maithili_shiva--- via R-help
Dear all, Thanks a lot for your valuable input. At the outset, let me clarify first that this was not a homework. In reality I had a data.frame containing returns of 121 risk factors and another data.frame of 121 weights arrived at using Marked to market (MTM) values of these 121 risk factors.