Code Monkey home page Code Monkey logo

boxr's Issues

Add `box_read_excel`

Make readxl an 'optional dependency', and use it to read excel files if detected with box_read, or explicitly with box_read_excel.

running BoxR from command line - Error in cont$type : $ operator is invalid for atomic vectors

I am running the following code from command line (works fine in interactive session),

require(boxr)
box_auth()
box_setwd("3862567703")

NULL
[1] "0"
Error in cont$type : $ operator is invalid for atomic vectors
Calls: box_setwd
Execution halted

here is my session info

sessionInfo(package=NULL)
R version 3.1.3 (2015-03-09)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack 1

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] sqldf_0.4-10 gsubfn_0.6-6 proto_0.3-10 RSQLite_1.0.0
[5] DBI_0.3.1 RODBC_1.3-12 boxr_0.3.1 RCurl_1.95-4.7
[9] bitops_1.0-6 XLConnect_0.2-11 XLConnectJars_0.2-9

loaded via a namespace (and not attached):
[1] assertthat_0.1 bit_1.1-12 bit64_0.9-5 chron_2.3-47
[5] curl_0.9.3 digest_0.6.8 grid_3.1.3 httr_1.0.0
[9] jsonlite_0.9.17 lattice_0.20-33 lubridate_1.3.3 magrittr_1.5
[13] memoise_0.2.1 plyr_1.8.3 R6_2.1.1 rCharts_0.4.5
[17] Rcpp_0.12.0 RGoogleAnalytics_0.1.1 rJava_0.9-7 RJSONIO_1.3-0
[21] rstudioapi_0.3.1 stringi_0.5-5 stringr_1.0.0 tcltk_3.1.3
[25] tools_3.1.3 whisker_0.3-2 yaml_2.1.13

Issues in authenticating on a specific server.

first off, awesome package!

It is working well on two of my machines, but fails authentication on our HPCC server. I am trying to investigate the issue, but the error message seems generic.

Specially I see:

box_auth(interactive = TRUE)
Reading client id from .Renviron
Reading client secret from .Renviron
Auto-refreshing stale OAuth token.
Error in box_auth(interactive = TRUE) : 
  Login at box.com failed; unable to connect to API.

further looking at the step at which it fails I see:

Browse[2]> test_req
Response [https://api.box.com/2.0/folders/0]
  Date: 2016-01-29 19:41
  Status: 200
  Content-Type: application/json
  Size: 2.27 kB
No encoding supplied: defaulting to UTF-8.

note

Since a browser is not accessible, I have copied the .boxr-oauth from my personal machine to the HPCC.

Interactive environment needed

Trying to use this function from command line but got this Error: oauth_listener() needs an interactive environment. It happens also when interactive = FALSE.

boxr::box_auth(
    client_id     = client_id,
    client_secret = client_secret,
    interactive = TRUE,
    write.Renv = FALSE
  )

Add box_write functions

In other words, wrapping local write functions (writing to tempfiles), and immediately uploading, returning a file reference.

box_fetch() seems to be limited maximum 100 files per directory

Hi,

First to say that this is a lifesaver of a package, thanks!

I am finding a weird and difficult to reproduce error (due to all the side effects), but the upshot is this, if I have a box.com directory with more than 100 files, some of the files are ignored in a box_fetch() operation. The updater will show 1/100, ..., 100/100.

Have you come across this behavior?

Also, I realize there may be a box.com setting that I am not aware of, so I'll try to look around for such a thing.

Thanks for any light you can cast on the situation!

Thanks,

Ian

R crashes when using box_read_excel()

I'm trying to use box_read_excel() to load in a fairly small .xls file hosted on box. I don't get any errors but prints some output along the lines of:

DEFINEDNAME: 07 b9 2b 08 7c 33 b2 83 88 f7 78 24 1c b5 f7 22 36 7e 10 43 a6 3b ff 5c 31 6b b4 a8 f2 0c

and then R subsequently crashes (I assume that it is running out of memory, but the file itself is pretty small, say only 200 rows and 20 columns).

Do you have any idea about what is going wrong here? Sorry if this is a completely silly question!

Feature suggestion: pass parser function as an argument to box_read_*

Great package! I noticed that you provide functions to read different files directly, e.g. csv or excel files. Would it be useful to include a generic function that allows the user to specify which R function to parse the file with?

For example, Mike Love's excellent tximport function / package includes the parser function, e.g. read.csv or readr::read_delim, as an argument. That way, the function is useful in many different contexts. At the same time, Mike didn't have to write multiple different functions for the various file formats.

Food for thought?
Best,
Thomas

Add piping example

Probably a good idea once you have search done. Something like (psuedo code):

box_search("raw_data.csv")             %>% 
  box_read()                           %>% 
  group_by(blah, blah)                 %>%
  summarise(average = mean(var))       %>% 
  box_write_csv("aggregated_data.csv") %>% 
  box_comment("Aggregated version of 'raw_data'")

Error after updating to R version 3.3.2

After updating to R version 3.3.2, I get the following error message, when trying to authenticate:

box_auth()
Reading client id from .Renviron
Reading client secret from .Renviron
Waiting for authentication in browser...
Press Esc/Ctrl + C to abort
Authentication complete.
Error in curl::curl_fetch_memory(url, handle = handle) :
Failure when receiving data from the peer

Add S3 class for box folders

As returned by box_dir_create.

Make sure that any functions which take a box folder id, can also accept the new object.

Reading client id from .Renviron Reading client secret from .Renviron Auto-refreshing stale OAuth token. Error in refresh_oauth2.0(self$endpoint, self$app, self$credentials) : client error: (400) Bad Request

I get the following error after I run the follwing two lines of code (this package worked fine last week?)

require(boxr)
box_auth()

Reading client id from .Renviron
Reading client secret from .Renviron
Auto-refreshing stale OAuth token.
Error in refresh_oauth2.0(self$endpoint, self$app, self$credentials) :
client error: (400) Bad Request

typo in box_auth

Sorry I tried doing a pull request but it wasn't working.

In the roxygen comment for box_auth pakcage should be package.

Error while fetching

Hi I am receiving this error while fetching files

Error in class(out) <- "boxr_object_list" :
attempt to set an attribute on NULL

Any idea on what went wrong?

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.