GithubHelp home page GithubHelp logo

Comments (6)

marcusyoung avatar marcusyoung commented on May 24, 2024

That function usually works without an error. Can you please provide your code up to and including that function. Also please confirm what version the running OTP instance is. Thank you.

from otp-tutorial.

kathy-bi avatar kathy-bi commented on May 24, 2024

Thanks so much for getting back to me so quickly!!!

I am using the otp.jar file included in the tutorial folder. Following the tutorial, I start an OTP instance from the command line. then in R, I run:

Accompanying code for Part 3 of OTP Tutorial

Install the otpr package

install.packages("otpr")

Now load the package

library(otpr)

Call otpConnect() to define a connection called otpcon

otpcon <- otp_connect(timezone = "Europe/London")

Call otp_get_times to get attributes of an itinerary

otp_get_times(
otpcon,
fromPlace = c(53.43329,-2.13357),
toPlace = c(53.36274,-2.27293),
mode = 'BUS',
date = '01-19-2021',
time = '08:00:00',
detail=TRUE
)

Please let me know if I need to provide any additional information. Thanks again!!

from otp-tutorial.

marcusyoung avatar marcusyoung commented on May 24, 2024

I'm unable to reproduce this error.

otpcon <- otp_connect(timezone = "Europe/London") wouldn't work as the parameter used in otp_connect() is tz.

With the otpr package loaded can you run sessionInfo() and then provide a screenshot/copy of the returned data.

Thanks

from otp-tutorial.

kathy-bi avatar kathy-bi commented on May 24, 2024

You're so right! I cleared my library and then was unable to successfully run otpcon <- otp_connect(timezone = "Europe/London"), but once I used otpcon <- otp_connect(tz = "Europe/London") and then ran otp_get_times with the detail option, I had no problems.

I suspect it's because I had both the otpr and opentripplanner packages loaded?

Thanks so much for your help!!!

from otp-tutorial.

marcusyoung avatar marcusyoung commented on May 24, 2024

Potentially, yes. The opentripplanner package was forked from otpr some years ago. They both share an otp_connect() function, but that function now differs between the two packages.

from otp-tutorial.

kathy-bi avatar kathy-bi commented on May 24, 2024

Got it, thanks so much for all of your help!!

from otp-tutorial.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.