Hey all!
So, I'm trying to make a simple script in which the output would be a string of combined text and data within an excel table, however, im having trouble finding the correct formula to call the specific value i want to print inside that table.
An example:
If the table looks like this:
................... Price . . . Volume . Pct. Change
Dow Jones. 34.000 . . 470.000 . . 0,45%
Nasdaq ...... 13.500 . . 900.000 . . -0,74%
S&P ............ 4.000 .. .. 230.000 . . 0,03%
I'm looking for the script that would give me an output similar to this:
'Nasdaq falls by -0,75% on todays session, closing at a price of 13.500 and a volume of 900.000'
I have a feeling this should be a fairly easy script, but my knowledge of R is limited and this would help me greatly.
Also, is there a way to make an if statement so that if the number in Pct. Change is a negative number, the output is 'falls' and, if instead, it's positive, the output is 'rises'?
Thank you so much in advance!Preformatted text