How do I get the getURL function to work in R? [duplicate]











up vote
0
down vote

favorite













This question already has an answer here:




  • Error: could not find function … in R

    10 answers




I am trying to work with JSON in R Studio and have installed the RJSONIO and Rcurl packages successfully but the getURL function is not working. I keep getting an error saying that the getURL function cannot be found.



  package ‘RCurl’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘RCurl’

> AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?
accessType=DOWNLOAD"
> apiResult <- getURL(AccidentURL)
Error in getURL(AccidentURL) : could not find function "getURL"


Any suggestions on how to get this function to work or how to build the function myself would be appreciated.










share|improve this question













marked as duplicate by Rich Scriven r
Users with the  r badge can single-handedly close r questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 17:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • The Maryland data portal is backed by Socrata so you can use the RSocrata package with it as well.
    – hrbrmstr
    Nov 10 at 17:42















up vote
0
down vote

favorite













This question already has an answer here:




  • Error: could not find function … in R

    10 answers




I am trying to work with JSON in R Studio and have installed the RJSONIO and Rcurl packages successfully but the getURL function is not working. I keep getting an error saying that the getURL function cannot be found.



  package ‘RCurl’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘RCurl’

> AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?
accessType=DOWNLOAD"
> apiResult <- getURL(AccidentURL)
Error in getURL(AccidentURL) : could not find function "getURL"


Any suggestions on how to get this function to work or how to build the function myself would be appreciated.










share|improve this question













marked as duplicate by Rich Scriven r
Users with the  r badge can single-handedly close r questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 17:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • The Maryland data portal is backed by Socrata so you can use the RSocrata package with it as well.
    – hrbrmstr
    Nov 10 at 17:42













up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:




  • Error: could not find function … in R

    10 answers




I am trying to work with JSON in R Studio and have installed the RJSONIO and Rcurl packages successfully but the getURL function is not working. I keep getting an error saying that the getURL function cannot be found.



  package ‘RCurl’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘RCurl’

> AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?
accessType=DOWNLOAD"
> apiResult <- getURL(AccidentURL)
Error in getURL(AccidentURL) : could not find function "getURL"


Any suggestions on how to get this function to work or how to build the function myself would be appreciated.










share|improve this question














This question already has an answer here:




  • Error: could not find function … in R

    10 answers




I am trying to work with JSON in R Studio and have installed the RJSONIO and Rcurl packages successfully but the getURL function is not working. I keep getting an error saying that the getURL function cannot be found.



  package ‘RCurl’ successfully unpacked and MD5 sums checked
Warning in install.packages :
cannot remove prior installation of package ‘RCurl’

> AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?
accessType=DOWNLOAD"
> apiResult <- getURL(AccidentURL)
Error in getURL(AccidentURL) : could not find function "getURL"


Any suggestions on how to get this function to work or how to build the function myself would be appreciated.





This question already has an answer here:




  • Error: could not find function … in R

    10 answers








r function






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 10 at 17:28









SLG333

155




155




marked as duplicate by Rich Scriven r
Users with the  r badge can single-handedly close r questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 17:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by Rich Scriven r
Users with the  r badge can single-handedly close r questions as duplicates and reopen them as needed.

StackExchange.ready(function() {
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function() {
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function() {
$hover.showInfoMessage('', {
messageElement: $msg.clone().show(),
transient: false,
position: { my: 'bottom left', at: 'top center', offsetTop: -7 },
dismissable: false,
relativeToBody: true
});
},
function() {
StackExchange.helpers.removeMessages();
}
);
});
});
Nov 10 at 17:35


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.














  • The Maryland data portal is backed by Socrata so you can use the RSocrata package with it as well.
    – hrbrmstr
    Nov 10 at 17:42


















  • The Maryland data portal is backed by Socrata so you can use the RSocrata package with it as well.
    – hrbrmstr
    Nov 10 at 17:42
















The Maryland data portal is backed by Socrata so you can use the RSocrata package with it as well.
– hrbrmstr
Nov 10 at 17:42




The Maryland data portal is backed by Socrata so you can use the RSocrata package with it as well.
– hrbrmstr
Nov 10 at 17:42












1 Answer
1






active

oldest

votes

















up vote
0
down vote













library(httr)
AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD"
apiResult <- GET(AccidentURL)


output



apiResult
Response [http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD]
Date: 2018-11-10 17:33
Status: 200
Content-Type: application/json; charset=utf-8
Size: 6.23 MB
{
"meta" : {
"view" : {
"id" : "pdvh-tf2u",
"name" : "2012 Vehicle Collisions Investigated by State Police",
"attribution" : "Maryland State Police",
"averageRating" : 0,
"category" : "Public Safety",
"createdAt" : 1367604900,
"description" : "Collisions investigated by the Maryland State Police in 2012 (does not include collisions investigated by local jurisdictions).",
...





share|improve this answer




























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    library(httr)
    AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD"
    apiResult <- GET(AccidentURL)


    output



    apiResult
    Response [http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD]
    Date: 2018-11-10 17:33
    Status: 200
    Content-Type: application/json; charset=utf-8
    Size: 6.23 MB
    {
    "meta" : {
    "view" : {
    "id" : "pdvh-tf2u",
    "name" : "2012 Vehicle Collisions Investigated by State Police",
    "attribution" : "Maryland State Police",
    "averageRating" : 0,
    "category" : "Public Safety",
    "createdAt" : 1367604900,
    "description" : "Collisions investigated by the Maryland State Police in 2012 (does not include collisions investigated by local jurisdictions).",
    ...





    share|improve this answer

























      up vote
      0
      down vote













      library(httr)
      AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD"
      apiResult <- GET(AccidentURL)


      output



      apiResult
      Response [http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD]
      Date: 2018-11-10 17:33
      Status: 200
      Content-Type: application/json; charset=utf-8
      Size: 6.23 MB
      {
      "meta" : {
      "view" : {
      "id" : "pdvh-tf2u",
      "name" : "2012 Vehicle Collisions Investigated by State Police",
      "attribution" : "Maryland State Police",
      "averageRating" : 0,
      "category" : "Public Safety",
      "createdAt" : 1367604900,
      "description" : "Collisions investigated by the Maryland State Police in 2012 (does not include collisions investigated by local jurisdictions).",
      ...





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        library(httr)
        AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD"
        apiResult <- GET(AccidentURL)


        output



        apiResult
        Response [http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD]
        Date: 2018-11-10 17:33
        Status: 200
        Content-Type: application/json; charset=utf-8
        Size: 6.23 MB
        {
        "meta" : {
        "view" : {
        "id" : "pdvh-tf2u",
        "name" : "2012 Vehicle Collisions Investigated by State Police",
        "attribution" : "Maryland State Police",
        "averageRating" : 0,
        "category" : "Public Safety",
        "createdAt" : 1367604900,
        "description" : "Collisions investigated by the Maryland State Police in 2012 (does not include collisions investigated by local jurisdictions).",
        ...





        share|improve this answer












        library(httr)
        AccidentURL <- "http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD"
        apiResult <- GET(AccidentURL)


        output



        apiResult
        Response [http://data.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD]
        Date: 2018-11-10 17:33
        Status: 200
        Content-Type: application/json; charset=utf-8
        Size: 6.23 MB
        {
        "meta" : {
        "view" : {
        "id" : "pdvh-tf2u",
        "name" : "2012 Vehicle Collisions Investigated by State Police",
        "attribution" : "Maryland State Police",
        "averageRating" : 0,
        "category" : "Public Safety",
        "createdAt" : 1367604900,
        "description" : "Collisions investigated by the Maryland State Police in 2012 (does not include collisions investigated by local jurisdictions).",
        ...






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Nov 10 at 17:33









        Aleksandr

        1,361716




        1,361716















            Popular posts from this blog

            Florida Star v. B. J. F.

            Danny Elfman

            Lugert, Oklahoma