tag:blogger.com,1999:blog-7630810606654250077.post2875351857736250198..comments2023-05-12T04:18:09.354-07:00Comments on Timely Portfolio: Performance with ggplot2klrhttp://www.blogger.com/profile/08783806801212705259noreply@blogger.comBlogger6125tag:blogger.com,1999:blog-7630810606654250077.post-16711626013652146292011-09-29T19:26:54.558-07:002011-09-29T19:26:54.558-07:00looks like Google docs converts .csv. Try redown...looks like Google docs converts .csv. Try redownloading. I uploaded as .txt this time. That way dates and numbers are in R generic format.<br /><br />Thanks for catching that.timelyportfoliohttps://www.blogger.com/profile/04547784367586422066noreply@blogger.comtag:blogger.com,1999:blog-7630810606654250077.post-47637257159698669752011-09-27T06:49:10.187-07:002011-09-27T06:49:10.187-07:00Thanks for the tip.
I was reading the data file, ...Thanks for the tip.<br /><br />I was reading the data file, but I found a couple of issues between the data and the script:<br /><br />- The date format in the data file doesn't seem to match the pattern in the script (format="%m-%d-%y").<br />- The negative values in column three of the data file seem to cause some warnings because the negative value is indicated by () rather than Davehttps://www.blogger.com/profile/00308481708219076602noreply@blogger.comtag:blogger.com,1999:blog-7630810606654250077.post-37531272549658387642011-09-26T18:49:06.697-07:002011-09-26T18:49:06.697-07:00thanks for reading and commenting. I am not sure,...thanks for reading and commenting. I am not sure, but it appears like the file is not being read properly. See instructions above for downloading the file. Then in the line<br /><br />clientPerf <- read.csv("clientperf.csv",stringsAsFactors=FALSE)<br /><br />put in the path where the file exists. For instance, if you put the file in c:\\windows\temp, then the line should read<br timelyportfoliohttps://www.blogger.com/profile/04547784367586422066noreply@blogger.comtag:blogger.com,1999:blog-7630810606654250077.post-9158440495474086462011-09-26T12:13:44.364-07:002011-09-26T12:13:44.364-07:00Right after the call on line 25:
returnTable <...Right after the call on line 25:<br /><br />returnTable <- table.TrailingPeriods(clientPerf,<br /> periods=c(12,24,36,NROW(clientPerf)),<br /> FUNCS="Return.annualized")<br /><br />I receive the error: <br /><br />Error in periodicity(R) : can not calculate periodicity of 1 observation<br /><br />I'm new to R, so I'm not sure why there is only 1 observation. Any idea?<br /><Davehttps://www.blogger.com/profile/00308481708219076602noreply@blogger.comtag:blogger.com,1999:blog-7630810606654250077.post-32425446716889789372011-09-17T10:36:03.141-07:002011-09-17T10:36:03.141-07:00Sorry I did not make the download clear. You can ...Sorry I did not make the download clear. You can click the picture of the csv or the link is https://doc-08-b4-docs.googleusercontent.com/docs/securesc/n71okoc1tul7t3r2lv2keh81ad14cuuf/agkjpc6gu1su15bn3td6vh6noolj822n/1316280600000/18361049972390078479/18361049972390078479/0B2qp2r96khJPMzBmNjQzZTgtMzFjNy00MDkwLTg0Y2EtOTQyMWM3NTZiYjY3?e=download&nonce=8p29cd03d8bd8&user=klrhttps://www.blogger.com/profile/08783806801212705259noreply@blogger.comtag:blogger.com,1999:blog-7630810606654250077.post-10987445253131823962011-09-17T05:48:30.284-07:002011-09-17T05:48:30.284-07:00This is a great blog, thanks for posting this! I&#...This is a great blog, thanks for posting this! I'm just learning R and your blog is a fantastic learning source.<br /><br />Is possible to download your "clientperf.csv" file?<br /> ThanksPStockhttps://www.blogger.com/profile/03914506320742654630noreply@blogger.com