{"action":"created","issue":{"url":"https://api.github.com/repos/bobmuscarella/ENMeval/issues/33","labels_url":"https://api.github.com/repos/bobmuscarella/ENMeval/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/bobmuscarella/ENMeval/issues/33/comments","events_url":"https://api.github.com/repos/bobmuscarella/ENMeval/issues/33/events","html_url":"https://github.com/bobmuscarella/ENMeval/issues/33","id":115471318,"number":33,"title":"Save all or part of HTML files...","user":{"login":"bobmuscarella","id":5683268,"avatar_url":"https://avatars.githubusercontent.com/u/5683268?v=3","gravatar_id":"","url":"https://api.github.com/users/bobmuscarella","html_url":"https://github.com/bobmuscarella","followers_url":"https://api.github.com/users/bobmuscarella/followers","following_url":"https://api.github.com/users/bobmuscarella/following{/other_user}","gists_url":"https://api.github.com/users/bobmuscarella/gists{/gist_id}","starred_url":"https://api.github.com/users/bobmuscarella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bobmuscarella/subscriptions","organizations_url":"https://api.github.com/users/bobmuscarella/orgs","repos_url":"https://api.github.com/users/bobmuscarella/repos","events_url":"https://api.github.com/users/bobmuscarella/events{/privacy}","received_events_url":"https://api.github.com/users/bobmuscarella/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-06T09:44:25Z","updated_at":"2015-11-19T01:49:19Z","closed_at":null,"body":"User's may be interested in the HTML files because:\r\n1) That's what they're familiar with reading\r\n2) They want to see the response curves\r\n3) Other...\r\n\r\nWe could provide an option to:\r\n1) Save the actual HTML file (this also requires saving all the other files generated)\r\n- I don't think this is the best option since it would be a file management nightmare and not easily usable by the user anyway.\r\n\r\n2) Somehow convert the HTML files into, say, PDFs and print them as a multipage PDF...\r\n- This may be nice if just visualizing the results is the goal.  None of the data would be directly available and not sure how much use this would actually get.  I'm not sure how to go from the HTML file to save as a PDF, either, but it must be possible...?\r\n\r\n3) Save the data from the response curves into the ENMevaluate object and make a function to plot the response curves.  \r\n- Writing the response curves takes additional time and I guess it makes sense only to do it for the \"full\" model (rather than each run of the k-fold iterations for evaluation).  This would also get to be a complex thing:  imagine 20 different model settings x 10 input variables each x response with and without other variables held constant...  anyways, this would achieved by getting the plot data before deleting the maxent files...\r\n\r\n```r\r\n# Add these options to the args passed to dismo::maxent\r\n...args=c('writeplotdata=true','responsecurves=true')\r\n\r\n# Assuming the model object is called, 'fullmod', get the response curve data for plotting:\r\nplotfiles <- list.files(paste(fullmod@path, 'plots', sep='/'))\r\nresp <- data.frame()\r\nfor (i in plotfiles[grep('.dat', plotfiles)]){\r\n\ttmp <- read.csv(paste(me@path, 'plots', i, sep='/'))\r\n\ttmp$file <- i\r\n\tresp <- rbind(resp, tmp)\r\n}\r\n\r\n# Then the plotting could happen something like this:\r\nplot(resp[,2][resp$file== plotdat[i]], resp[,3][resp$file==plotdat[i]], xlab=plotdat[i], type='l', col=2, lwd=3, ylab='Maxent Output')\r\n\r\n```\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/bobmuscarella/ENMeval/issues/comments/157921536","html_url":"https://github.com/bobmuscarella/ENMeval/issues/33#issuecomment-157921536","issue_url":"https://api.github.com/repos/bobmuscarella/ENMeval/issues/33","id":157921536,"user":{"login":"ndimhypervol","id":2090459,"avatar_url":"https://avatars.githubusercontent.com/u/2090459?v=3","gravatar_id":"","url":"https://api.github.com/users/ndimhypervol","html_url":"https://github.com/ndimhypervol","followers_url":"https://api.github.com/users/ndimhypervol/followers","following_url":"https://api.github.com/users/ndimhypervol/following{/other_user}","gists_url":"https://api.github.com/users/ndimhypervol/gists{/gist_id}","starred_url":"https://api.github.com/users/ndimhypervol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ndimhypervol/subscriptions","organizations_url":"https://api.github.com/users/ndimhypervol/orgs","repos_url":"https://api.github.com/users/ndimhypervol/repos","events_url":"https://api.github.com/users/ndimhypervol/events{/privacy}","received_events_url":"https://api.github.com/users/ndimhypervol/received_events","type":"User","site_admin":false},"created_at":"2015-11-19T01:49:18Z","updated_at":"2015-11-19T01:49:18Z","body":"I'm pretty sure you can plot the response curves by doing response(mx) if\nmx is the model object. I don't like offering the HTML files because\nbesides being a file management nightmare, all the info they need is in the\nmodel object. Instead, we can make a vignette that shows them how to plot\nall the things they want.\n\nOn 6 November 2015 at 04:44, Bob Muscarella <notifications@github.com>\nwrote:\n\n> User's may be interested in the HTML files because:\n> 1) That's what they're familiar with reading\n> 2) They want to see the response curves\n> 3) Other...\n>\n> We could provide an option to:\n> 1) Save the actual HTML file (this also requires saving all the other\n> files generated)\n>\n>    - I don't think this is the best option since it would be a file\n>    management nightmare and not easily usable by the user anyway.\n>\n> 2) Somehow convert the HTML files into, say, PDFs and print them as a\n> multipage PDF...\n>\n>    - This may be nice if just visualizing the results is the goal. None\n>    of the data would be directly available and not sure how much use this\n>    would actually get. I'm not sure how to go from the HTML file to save as a\n>    PDF, either, but it must be possible...?\n>\n> 3) Save the data from the response curves into the ENMevaluate object and\n> make a function to plot the response curves.\n>\n>    - Writing the response curves takes additional time and I guess it\n>    makes sense only to do it for the \"full\" model (rather than each run of the\n>    k-fold iterations for evaluation). This would also get to be a complex\n>    thing: imagine 20 different model settings x 10 input variables each x\n>    response with and without other variables held constant... anyways, this\n>    would achieved by getting the plot data before deleting the maxent files...\n>\n> # Add these options to the args passed to dismo::maxent...args=c('writeplotdata=true','responsecurves=true')\n> # Assuming the model object is called, 'fullmod', get the response curve data for plotting:plotfiles <- list.files(paste(fullmod@path, 'plots', sep='/'))resp <- data.frame()for (i in plotfiles[grep('.dat', plotfiles)]){\n>     tmp <- read.csv(paste(me@path, 'plots', i, sep='/'))\n>     tmp$file <- i\n>     resp <- rbind(resp, tmp)\n> }\n> # Then the plotting could happen something like this:\n> plot(resp[,2][resp$file== plotdat[i]], resp[,3][resp$file==plotdat[i]], xlab=plotdat[i], type='l', col=2, lwd=3, ylab='Maxent Output')\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/bobmuscarella/ENMeval/issues/33>.\n>\n\n\n\n-- \nJamie Kass\nPhD Student, Biology\nAnderson Lab <http://web.sci.ccny.cuny.edu/~anderson/>, City College, NYC\n"}}