Giter Club home page Giter Club logo

osf-upload's Introduction

R code that uses the "osfr" package to interact with the Open Science Framework (OSF) and upload files to a project on OSF. This code is used to authenticate with OSF, retrieve a project node, and upload files to it.

  • Loading the "osfr" Library: The code starts by loading the "osfr" library, which is used for interacting with the OSF.

  • Authentication: You need to provide a Personal Access Token (PAT) from your OSF account. You can generate this token in your OSF account settings. The token is then used to authenticate your R session with OSF using the osf_auth() function.

  • Project Identifier (GUID): You specify the Global Unique Identifier (GUID) of the OSF project you want to interact with. This is the project where you will upload files.

  • Retrieve Project Node: The osf_retrieve_node() function is used to retrieve the project node based on its GUID. This sets the context for the subsequent operations.

  • OSF Upload: The osf_upload() function is used to upload files to the specified project node. It takes parameters such as the node (project node), the local file path you want to upload, options for recursion into subfolders, and whether to display a progress bar during the upload.

  • node: The project node you retrieved earlier. "filepath/to/local/machine": Replace this with the actual file path on your local machine. recurse = TRUE: This option allows you to upload files recursively, including files in subfolders. progress = TRUE: This option shows a progress bar during the upload. The comments in the code provide additional information and usage instructions.

Remember to replace "Paste your PAT here" and "xxxxx" with your actual PAT and project GUID.

Make sure you have the "osfr" package installed in your R environment to run this code successfully. You can install it using install.packages("osfr") if you haven't already.

osf-upload's People

Contributors

swarmoi avatar

Watchers

 avatar

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.