Ironholds / WikidataR

An R package for the Wikidata API
Other
53 stars 14 forks source link

add generic accessor methods for data structures returned by get_item #22

Closed raphaelvolz closed 7 years ago

raphaelvolz commented 8 years ago

Make working with the result easier

Ironholds commented 8 years ago

Can you define "generic accessor methods"?

raphaelvolz commented 8 years ago

instead of built in vector/data frame handling in R I would want to have for example a method, that gives me the direct value of a a property for an object

Example

adams <- get_item("42")

Now I have to navigate in the data frame of data frames of

adams$claims

to find what i need

I would be looking to use something olike

adamswebsite < get_value("42", "P856")

Now i have to navigate ...$mainsnak$datavalue$value

2016-07-20 15:51 GMT+02:00 Oliver Keyes notifications@github.com:

Can you define "generic accessor methods"?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Ironholds/WikidataR/issues/22#issuecomment-233954875, or mute the thread https://github.com/notifications/unsubscribe-auth/ASS7Jd1Ht9Ya0kgwPDsq9NupRpIk2jl1ks5qXifJgaJpZM4JQrEU .

Have fun and nice adventures !

Raphael Volz

nogago GmbH - Leading outdoor navigation apps since 2009.

Please kindly consider trying our other products, recommending them to your friends and rating our products in the app store

Android Maps - https://play.google.com/store/apps/details?id=com.nogago.android.maps Tracks - https://play.google.com/store/apps/details?id=com.nogago.bb10.tracks

BlackBerry10 Maps - http://appworld.blackberry.com/webstore/content/128568/ Tracks -http://appworld.blackberry.com/webstore/content/28277456/ ... and more FREE APPS ... http://appworld.blackberry.com/webstore/vendor/2395

BlackBerry 4.5-7.1 Outdoor GPS - http://appworld.blackberry.com/webstore/content/13904/ Guide - http://appworld.blackberry.com/webstore/content/41684/ Head Up Display - http://appworld.blackberry.com/webstore/content/6444/

nogago GmbH - http://www.nogago.com/ Postfach 45 - DE 76597 Loffenau - Germany

Directed by Dr. Sara Brockmans and registered at Amtsgericht Mannheim under number HRB 712259 with residence at Loffenau, Germany

Ironholds commented 8 years ago

Sounds sensible. Thanks! In the future it would be great to have all of this when the feature request is first submitted.