<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can arc.write be used for R data frame made from excel? in R-ArcGIS Questions</title>
    <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862568#M263</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shaun,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked out when adding the name of new feature class as you suggested!&lt;/P&gt;&lt;P&gt;Thank you so much, I really appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kenta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Sep 2018 04:02:27 GMT</pubDate>
    <dc:creator>KentaOkuyama</dc:creator>
    <dc:date>2018-09-12T04:02:27Z</dc:date>
    <item>
      <title>Can arc.write be used for R data frame made from excel?</title>
      <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862564#M259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I've just started using "arcgisbinding" package in R.&lt;/P&gt;&lt;P&gt;I'm trying some basic data transfer between R and ArcGIS Pro, and I have one question.&lt;/P&gt;&lt;P&gt;Can I write R data.frame (which I read from excel) to ArcGIS?&amp;nbsp;&lt;/P&gt;&lt;P&gt;After I have seen some resources, looks like only the object I read in R from ArcGIS object can be transferred back.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if there is a way to transfer my R data frame object (which are originally made from excel, csv, etc.) to Arc GIS, this would be great.&lt;/P&gt;&lt;P&gt;*** R data frame object I want to transfer to Arc GIS does not have any spatial information. It has two columns "ID" and "address" as string. So I want to transfer it to ArcGIS gdb table not as feature class.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would greatly appreciate if anyone can help out with this!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My code I attempted in R:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df&amp;nbsp;&amp;lt;- read_excel("G:/AllData/Kyuson_Aza/Kyuson_AzaListFinal.xlsx")&lt;/P&gt;&lt;P&gt;df2&amp;nbsp;&amp;lt;- df[2,4]&lt;BR /&gt;# export this data frame to Arc GIS&lt;BR /&gt;arc.write(path = "C:/Users/kenta/Documents/ArcGIS/Projects/MyProject2/MyProject2.gdb", data = df2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The error I got:&lt;/P&gt;&lt;P&gt;Error in .call_proxy("arc_export2dataset", path, pairlist(data = data, : dataset already exists&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Sep 2018 00:57:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862564#M259</guid>
      <dc:creator>KentaOkuyama</dc:creator>
      <dc:date>2018-09-06T00:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc.write be used for R data frame made from excel?</title>
      <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862565#M260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can transfer your R data frame object to ArcGIS as a table like you describe. Based on your code, it looks like you might just need a minor modification or two.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One problem might be the subset you have created.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;df&amp;nbsp;&amp;lt;- read_excel("G:/AllData/Kyuson_Aza/Kyuson_AzaListFinal.xlsx")&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;df2&amp;nbsp;&amp;lt;- df[2,4]&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;In this case, you are asking for object df2 to contains the element in the second row and fourth column. This means this new object would no longer be a data frame but rather, the type of element contained in that location. In which case, the arc.write() function would not recognize it as a valid object to write.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;However, if you made a larger subset that still was a data frame:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;df&amp;nbsp;&amp;lt;- read_excel("G:/AllData/Kyuson_Aza/Kyuson_AzaListFinal.xlsx")&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;df2&amp;nbsp;&amp;lt;- df[2:3,4:6]&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;You could write it back using the following line:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;arc.write(path = "C:/Users/kenta/Documents/ArcGIS/Projects/MyProject2/MyProject2.gdb", data = df2, overwrite = TRUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;That last&amp;nbsp;parameter is key. Based on the error you provide, it seems you may have already written a table but, are now trying to overwrite it and are currently being prevented from doing so.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;I hope this helps!&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN&gt;-Marjean&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Sep 2018 22:47:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862565#M260</guid>
      <dc:creator>MarjeanPobuda</dc:creator>
      <dc:date>2018-09-10T22:47:07Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc.write be used for R data frame made from excel?</title>
      <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862566#M261</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marijean,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much for your comments. That was really helpful.&lt;/P&gt;&lt;P&gt;I made sure to create R data frame by following code.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;df&amp;nbsp;&amp;lt;- read_excel("G:/AllData/Kyuson_Aza/Kyuson_AzaListFinal.xlsx")&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;df2&amp;nbsp;&amp;lt;- df[c("year","address")]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have attempted this code:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;arc.write(path = "C:/Users/kenta/Documents/ArcGIS/Projects/MyProject/MyProject.gdb", data = df2, overwrite = TRUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;It ran without errors. But I still could not get gdb table in my ArcGIS project database.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I'm sorry it's in Japanese, but I'm attaching the screen shots what happened before and after I ran my code.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Before I ran my R code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG alt="This is before I ran my arc.write code" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/421659_Before.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;After I ran my R code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;A new MyProject.gdb appeared, but nothing in those databases.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;IMG alt="This is after I ran my arc.write code" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/421660_After.PNG" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;I appreciate for your additional helps and suggestions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Best,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Kenta&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 03:12:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862566#M261</guid>
      <dc:creator>KentaOkuyama</dc:creator>
      <dc:date>2018-09-12T03:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc.write be used for R data frame made from excel?</title>
      <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862567#M262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Kenta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It looks like you may be trying to create a new feature class, and if that's the case, you'll want to give a fully qualified name for the path. The first parameter right now is the path to the File Geodatabase, but you'll also want a feature class name, such as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;arc.write(path = "C:/Users/kenta/Documents/ArcGIS/Projects/MyProject2/MyProject2.gdb/Kyuson_Aza", data = df2, overwrite = TRUE)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There are more examples of paths that are valid for arc.write in the &lt;A href="https://www.rdocumentation.org/packages/arcgisbinding/versions/1.0.1.229/topics/arc.write"&gt;arc.write package documentation&lt;/A&gt; that may prove helpful.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Shaun&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 03:45:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862567#M262</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2018-09-12T03:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc.write be used for R data frame made from excel?</title>
      <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862568#M263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Shaun,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It worked out when adding the name of new feature class as you suggested!&lt;/P&gt;&lt;P&gt;Thank you so much, I really appreciate it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kenta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 04:02:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862568#M263</guid>
      <dc:creator>KentaOkuyama</dc:creator>
      <dc:date>2018-09-12T04:02:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc.write be used for R data frame made from excel?</title>
      <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862569#M264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kenta,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great! Glad Marjean and I were able to help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best of luck working with ArcGIS and R,&lt;/P&gt;&lt;P&gt;Shaun&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 04:04:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862569#M264</guid>
      <dc:creator>ShaunWalbridge</dc:creator>
      <dc:date>2018-09-12T04:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Can arc.write be used for R data frame made from excel?</title>
      <link>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862570#M265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, thank you Shaun and Marjean!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kenta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 04:07:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/r-arcgis-questions/can-arc-write-be-used-for-r-data-frame-made-from/m-p/862570#M265</guid>
      <dc:creator>KentaOkuyama</dc:creator>
      <dc:date>2018-09-12T04:07:17Z</dc:date>
    </item>
  </channel>
</rss>

