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

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.

Related

Code not working, could not find function. Maps package

This error has me completely stumped. This morning my code worked, this afternoon it does not.
I'm using the maps package to bring through the country code based on Longitude and Latitude coordinates within a data frame. The code I am using is: Latest[, COUNTRY := map.where(x = LONGITUDE, y = LATITUDE)]
This morning this worked fine, but now, this afternoon, I get the following error message:
Error in :=(COUNTRY, map.where(x = LONGITUDE, y = LATITUDE)) :
could not find function ":="
I had installed other map packages in a desperate bid to try and identify cases that retrieved an NA result using this code, that's the only change I made.
Since then I have:
Restarted RStudio
Restarted my computer
Deleted all new packages and restarted Rstudo
Deleted and reinstalled R itself including packages
Deleted RStudio and reinstalled with the same version
Restarted my computer again
No matter what I do it just resolutely gives the same meaningless, at least to me, error.
I'm getting desperate here folks, have a major project I need to get over the line and this error has ground me to a halt!

what happened to missing.pattern.plot or mp.plot?

I have the package mi installed.
But when I try to run mp.plot (as Thomas Leeper does in this tutorial:) I get the following error message:
mp.plot(mydf)
Error in mp.plot(mydf) : could not find function "mp.plot"
On one website this is called missing.pattern.plot, but that also does not work:
missing.pattern.plot(mydf)
Error in missing.pattern.plot(mydf) :
could not find function "missing.pattern.plot"
Any idea what the issue might be?
I do not really care much if I cannot use this function, but I'm curious as to what is going on in case I later need to use a graph that I really need.

R and RGoogleDocs - trouble with auth

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

"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