使用R连接到共享点列表 [英] Using R to connect to a sharepoint list

查看:80
本文介绍了使用R连接到共享点列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人能在R中将SharePoint列表作为数据框导入吗?

Has anyone been able to import a SharePoint list in R as a dataframe?

我有两个单独的数据源,一个来自SharePoint列表,另一个来自一个我希望对其进行分析的数据库。我能够毫无问题地连接到数据库,但是似乎找不到任何东西可以连接到SharePoint列表。

I have two separate data sources, one from a SharePoint list and the other from a DB that I wish to run an analysis on. I am able to connect to the DB without any problem but can't seem to find anything to connect to a SharePoint list.

SharePoint服务器是2007

The SharePoint server is 2007

推荐答案

我一直在研究使用R的SharePoint 2010列表。基本上,我使用SharePoint Web服务从列表中返回结果,然后使用xmlToDataFrame转换为数据框。

I've been working on reading SharePoint 2010 lists using R for a little while now. Basically, I use the SharePoint web service to return the results from the list, then use xmlToDataFrame to convert to a dataframe.

URL <- "http://yoursharepointserver/_vti_bin/ListData.svc/yourlist"    
data = xmlParse(readLines(URL))

## get the individual list items    
items = getNodeSet(data, "//m:properties")

## convert to a data frame
df = xmlToDataFrame(items, stringsAsFactors = FALSE)

由于我正在使用Web服务,因此可以在返回结果之前过滤列表,这对于克服以下限制非常有帮助SharePoint Web服务。以下链接非常有帮助...
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/21/introduction-to-querying-清单与休息和清单数据-svc-in-sharepoint-2010.aspx

Since I'm using the web service I can filter the list before I return the results, which is really helpful in overcoming the limitations of the SharePoint web service. The following link is quite helpful... http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2010/01/21/introduction-to-querying-lists-with-rest-and-listdata-svc-in-sharepoint-2010.aspx

这篇关于使用R连接到共享点列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆