Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a map of France with the contour of French departments in an SVG file. I would like to import the data in R to draw a choropleth map. Is it possible ? What would be the best solution ?
There's SVGMapping::loadSVG (at CRAN) -- I haven't tried it so can't speak to its quality.
Edit: might as well mention the sos package here, as it's really an indispensable tool for finding R packages and functions for the user.
I guess it is possible. SVG is nothing more than a XML document. But why don't you use maps library?
library(maps)
map('france')
You can check:
> map('france')$names
[1] "Nord"
[2] "Pas-de-Calais"
[3] "Somme"
...
for departments names, and paint individual departments like this:
colors[c(112, 114)] <- 'blue'
map('france', fill=T, col=colors)
See maps documentation for more.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Is there any package that you would recommend which can be used to calculate the precision, F1, recall for multi class classification task in R. I tried to use ROCR but it states that:
ROCR currently supports only evaluation of binary classification tasks
I know that you were looking for a solution in R. That said, this is a link to a nice solution library in Python, using scikit-learn version 0.14. Python is very similar to R in a lot of respects (if you haven't used it before), and this could be a good place to start.
Another place you might want to look, if you are focused on R, is the the PerfMeas package. As I quote, this "Package implements different performance measures for
classification and ranking tasks. AUC, precision at a given recall, F-score for single and multiple classes are available."
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
By using Sci-lab I need to draw triangle cicrle and rectangular (separately, of course). the most difficult for me is triangle, I have no idea how to plot them
Plotting is rather trivial. See the plot command reference.
There are shorter ways, but for easiest understanding just plot the three sides as three lines.
For instance if you have a triangle with the corner coordinates at (x,y) = [0,0],[5,10],[10,0]. Plot three lines between these points.
plot([0,5],[0,10])
plot([5,10],[10,0])
plot([0,10],[0,0])
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a quick question on the conversion from R to Latex. I did a lot of calculations in R to produce various tables. These are not standard, but rather custom objects. Next I'd like to convert the results to my Latex document which is generally created by Texstudio.
Some of the R-packages I have checked here: Tools for making latex tables in R
allow for standard objects to be converted into Latex tables.
I think the question is interesting to a lot of people: What is the usual package you would use for this purpose? There are a few packages out there which could be used, but I am asking for experience and recommendations in the described context. Some of my tables are quite big, others rather small. Also someone recommended me Knitr/Sweave, but it doesn't seem to produce tables in Latex style that I can copy into my Latex document; instead it produces directly pdf-tables. Am I missing something here? But that was only a sidenote, I am just looking for the best method to accomplish conversion from non-standard R-tables into Latex.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
As mentioned in question is there something like iPython's notebook (jupyter) for R-CRAN?
Have a look at Ramnath's R notebook:
http://www.youtube.com/embed/3niqZhc_Nbo
And here's the GitHub: https://github.com/ramnathv/rNotebook
EDIT (1/6/15)
I think the new editR package is what you're after
https://github.com/swarm-lab/editR
Not sure it would be an exact equivalent of iPython's notebooks, but you can use knitr to make literacy programming in R, by inserting code chunks inside a document. If you use a format like RMarkdown, you can export the document and the result of the code chunks to HTML. You can then publish the HTML file somewhere, or use sites like Rpubs. This process is quite straightforward if you use the RStudio IDE.
Another way, if you are an Emacs user, is to use org-mode and its extension org-babel.
Finally, you should be able to create more dynamic things with a framework like shiny. See for example the following knitr demo from the shiny library :
R> library(shiny)
R> demo("notebook", package = "knitr")
Would this be what you are looking for? http://www.rstudio.com/ide/
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
R provides a very powerful package called laplacesdemon for bayesian inference using the laplace distribution. I was wondering if there is any equivalent package for Matlab?
Thanks!
The question was a bit short so I'm not sure if this is exactly what you are asking for but here goes:
No - there is no Laplacedemon equivalent in Matlab
Yes - there are lots of Matlab packages that partly overlap with LaplaceDemon. As I don't know exactly what you want to do my recommendation is likely to have a high variance. Having established that I suggest that you take a look at http://becs.aalto.fi/en/research/bayes/gpstuff/ :). If you feel comfortable with using MCMC directly, you can take a look at http://helios.fmi.fi/~lainema/mcmc/. (I believe that matlab has some functions for this directly in their statistics or/and econometrics toolboxes)
You could also run R directly from Matlab http://neurochannels.blogspot.se/2010/05/how-to-run-r-code-in-matlab.html or http://rwiki.sciviews.org/doku.php?id=tips:callingr:matlab