R and RGoogleDocs - trouble with auth - r

here's the deal with RGoogleDocs: when I run:
auth = getGoogleAuth("mymail#gmail.com", "my pass",service="wise")
I always have this (I try different login/passw):
Error in strsplit(ans, "\\\n") : non-character argument
I am trying different ways for it with no success. Please help, what's wrong? And
may be there're any other packages for connect R and Google sheets? Thanks
~~~~~~~~~~~~~~~~~~~~~~~~ 1 Day later:
I fix it with library(googlesheets), that works fine

Related

Calling Mastodon API in R Studio

Please can someone help me figure out what is going on? I used the mastodon library in R Studio to extract some data from the fediverse successfully a while ago. Here is the code I used:
tokens <- login("https://mastodon.social/",user = user,pass = password)
"user" is my email address.
It worked well initially, but trying it again, I am getting this annoying error message, which I do not understand:
Error in UseMethod("content", x) :
no applicable method for 'content' applied to an object of class "response"
Please can any good samaritan out there who has used this library in R Studio help me figure out what is going on? I need to prepare a report on this project. Thanks in advance of your help.
It is possible that some functions may have masked the function. By calling this on a fresh R session, it did work
tokens <- login("https://mastodon.social/",user = user,pass = password)
tokens$instance
[1] "https://mastodon.social/"

ggmap mapdist() not working after running devtools::install_github('dkahle/ggmap')

I wonder if someone can help,
I randevtools::install_github('dkahle/ggmap') when trying to fix the issue of ggmap mapdist function repeating calculation for certain O-D pairs.
before running this the code mapdist('Manchester Deaf Institute', 'Birmingham O2 Academy 1', mode = 'driving') would return a result, however now after running devtools::install_github('dkahle/ggmap')
I just get the following error Error intmp[[c(1, 1)]] : subscript out of bounds
I am no where near the API limit for the day, and as this was working perfectly beforehand I am unsure why this is not working.
Does anyone have any suggestions?
thanks
Not really a solution but the only was I have been able to get past this is to uninstall and reinstall R.

Creating a variable list in tidycensus in R: How to resolve Error in bind_rows_(x, .id)?

First time posting, so let me know if there's anything that I can do to improve my question. I'm currently trying to pull some data from the census using tidycensus. To do so, I need to know that names of the variables.
The creator's guide (https://walkerke.github.io/tidycensus/reference/load_variables.html) recommends using this line of code to create a variable list that you can filter:
library(tidycensus)
v15 <- load_variables(2015, "acs5", cache = TRUE)
view(v15
However, each time I use it, R returns:
"Error in bind_rows_(x, .id) : Argument 6 must be length 1, not 0"
How do I resolve this error?
Thanks!
Update: this is now fixed in the development version of tidycensus. Install from GitHub with devtools::install_github("walkerke/tidycensus") and give it a try. I'll have the updates on CRAN soon.
Update: this is now fixed in the development version of tidycensus. Install from GitHub with devtools::install_github("walkerke/tidycensus") and give it a try. I'll have the updates on CRAN soon.
That worked for me. Thanks! I'm looking forward to using this in a class this fall.

"PickSoftThreshold" function issue in WGCNA?

Currently I am applying one dataset to WGCNA codes for Network construction and Module detection. Here I have to use a function called "pickSoftThreshold" to detect the network topology. When I run that it shows me this error-
> sft = pickSoftThreshold(datExpr, powerVector = powers, verbose = 5)
pickSoftThreshold: will use block size 18641.
pickSoftThreshold: calculating connectivity for given powers...
..working on genes 1 through 18641 of 54675
Error in serialize(data, node$con) : error writing to connection
Any idea how to get rid of that?
Thanks in Advance!!
I myself just started using WGCNA a couple of days ago and am not really familiar with it yet. But the error looks like you are using too many genes (up to 55k): I think you should find a way to filter out some of them, if your computer isn't powerful enough.
(Ideas from http://labs.genetics.ucla.edu/horvath/CoexpressionNetwork/Rpackages/WGCNA/faq.html )

GoogleVis, Geomap Plot error

When I want to create the map using the gvisGeoMap() from googleVis, I get error:
## Using the google visualization API with R
library(googleVis)
input<- read.csv("data.csv")
select<- input[which(input$Subgroup=="Total 5-14"),]
select<- input[which(input$Subgroup=="Total 5-14 yr"),]
Map<- data.frame(select$Country.or.Area, select$Value)
names(Map)<- c("Country", "Percentage")
Geo=gvisGeoMap(Map, locationvar="Country", numvar="Percentage",
options=list(height=350, dataMode='regions'))
plot(Geo)
#starting httpd help server ... done
#Error in ifelse(interactive(), getOption("browser"), "false") :
#replacement has length zero
The above is the error in the "RGui". The error message in "RStudio" is differet:
#object of type 'closure' is not subsettable
and the browser does not fire at all. The HTTP server works fine since I can simply call help pages.( for example ?googleVis will fire up the browser and give the help page). The "Geo" object in the code above is fine and contains the html code only that the plot() does not do what it is supposed to do (I can manually run the html file in the temp folder and see the results). The example above is available here.
I would appreciate your clues.
Thank you
This is the result of correspondance with the the Authors of the packages. It seems that there was a bug that prevented the plot to work properly. The released a new version. You can find the link below.
TQ
.....
Yesterday evening I realised that with version 0.3.0 of googleVis I unfortunately introduced a bug in RStudio and R on Windows.
The bug has been fixed already and a new version (0.3.1) is available from our project site (here is the link), but not on CRAN yet.
I have put a note on my blog (here is the link) to inform others as well.
I hope this helps.
Best regards
Markus

Resources