R studio not auto completing. New install - r

I've just had my IT department install R and R studio. However it isn't autocompleting. This isn't the end of the world but it's very annoying. Is there anything that I can do to rectify?
I have it on another machine here and it works (but that cannot download certain packages so I know it's possible in the company)
Let me know if there are certain things that I should add to the question to help you help me.
Cheers,
J
PS I can't access stackoverlow from work right now ( it thinks there's a virus in the site. So this has been posted on my phone and so it might be poorly formatted)
sessionInfo()
R version 3.1.2 (2014-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252 LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C LC_TIME=German_Germany.1252
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] CHAID_0.1-2 partykit_1.0-5 ROSE_0.0-3
loaded via a namespace (and not attached):
[1] splines_3.1.2 survival_2.37-7 tools_3.1.2

Related

How to successfully call C code on super computer using ucminf package in R

I am trying to run the some unconstrained optimization on a large problem on
a super computer, so I am trying to use the ucminf (although this problem
also works if I use the ucminf option in optimx). When I run any simple
optimization, I get the following message:
Error in .Call("mfopt", fnstr, grstr, rho, PACKAGE = "ucminf") :
"mfopt" not available for .Call() for package "ucminf"
For simplicity, here is a simple bit of test code that gives me the error.
library(ucminf)
test<-function(x){
(x-3)^2}
ucminf(0,test)
All of this works fine on my personal computer, but does not work on the
super computer. I have tried this on R/3.5.0 and R/3.3.0 on the super
computer and they both give me the same error.
Here is my Session info.
R version 3.5.0 (2018-04-23)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS release 6.9 (Final)
Matrix products: default
BLAS: /usr/public/R/3.5.0.gnu/lib64/R/lib/libRblas.so
LAPACK: /usr/public/R/3.5.0.gnu/lib64/R/lib/libRlapack.so
locale:
[1] LC_CTYPE=en_US.iso885915 LC_NUMERIC=C
[3] LC_TIME=en_US.iso885915 LC_COLLATE=en_US.iso885915
[5] LC_MONETARY=en_US.iso885915 LC_MESSAGES=en_US.iso885915
[7] LC_PAPER=en_US.iso885915 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ucminf_1.0-5 numDeriv_2016.8-1
loaded via a namespace (and not attached):
[1] compiler_3.5.0
I have uninstalled and reinstalled the package using Rinstall('ucminf'). Does anyone have experience with this and how to fix it?

Graphics API version mismatch

I have a big problem
I update R to the latest version.
After updating, every time i try to plot something with whatsoever kind of graphic function( even with the basic plot) i get this error
Error: Graphics API version mismatch
these are my session info
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=Italian_Italy.1252
[2] LC_CTYPE=Italian_Italy.1252
[3] LC_MONETARY=Italian_Italy.1252
[4] LC_NUMERIC=C
[5] LC_TIME=Italian_Italy.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods
[7] base
loaded via a namespace (and not attached):
[1] compiler_3.3.2 tools_3.3.2
Note: no visible binding for global variable 'x'
Note: no visible binding for global variable 'envir'
All packages installed are updated to the latest version available

Ctrl + Shift + D doesn't run documentation routines

According to the shortcuts help (Alt+Shift+K) the combination Ctrl+Shift+D should run the documentation routines. (This is also said in Section 5.1 of Hadley Wickhams "R packages" http://runsheng.github.io/attachment/r-packages.pdf.) But in my RStudio-setting, it doublicates the selected row (so I don't belive it is a global usage problem brought up in the answers here: Visual Studio won't recognize key combination). On https://support.rstudio.com/hc/en-us/community/posts/201819358-Ctrl-Shift-D-doesn-t-run-document-in-preview-release the issue was brought up by someone, but without a solution. How can I make RStudio do what it should do?
I'm using RStudio version 0.99.902 and sessionInfo() gives:
R version 3.3.1 (2016-06-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] hmi_0.1.0 roxygen2_5.0.1 coda_0.18-1 MASS_7.3-45 devtools_1.12.0
loaded via a namespace (and not attached):
[1] magrittr_1.5 tools_3.3.1 withr_1.0.2 rstudioapi_0.6 Rcpp_0.12.5
[6] memoise_1.0.0 stringi_1.1.1 grid_3.3.1 stringr_1.0.0 digest_0.6.9
[11] lattice_0.20-33
Can you double check what these options are set to in Project Options?
You might need to ensure that both
Use devtools package functions in available
Generate documentation with Roxygen
are both checked.

What can I do about frequent, unreproducible segfault errors in R 3.0.1?

After upgrading to R 3.0.X, I've started getting pretty frequent, unreproducible segfault errors like those found by this asker. I never had one of these errors before with R 2.X.X. For example, this is the session info for a long block of code that just caused a fault. However, after R crashed, I ran the entire block of code again and there was no error.
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] klaR_0.6-8 ggplot2_0.9.3.1 labdsv_1.5-0 MASS_7.3-26 mgcv_1.7-22
[6] cluster_1.14.4 sparcl_1.0.3 FD_1.0-11 vegan_2.0-7 permute_0.7-0
[11] geometry_0.3-3 magic_1.5-4 abind_1.4-0 ape_3.0-8 ade4_1.5-2
[16] plyr_1.8
loaded via a namespace (and not attached):
[1] class_7.3-7 colorspace_1.2-2 dichromat_2.0-0 digest_0.6.3
[5] e1071_1.6-1 grid_3.0.1 gtable_0.1.2 labeling_0.1
[9] lattice_0.20-15 Matrix_1.0-12 munsell_0.4 nlme_3.1-109
[13] proto_0.3-10 RColorBrewer_1.0-5 reshape2_1.2.2 scales_0.2.3
[17] stringr_0.6.2
Sometimes R freezes completely and I have to do a force quit, but other times, it allows me to exit with options for a core dump or saving the workspace.
Someone in another post suggested setting options(CBoundsCheck=T) and that seemed to work for a while but I am still getting frequent faults.
I don't think these faults are related to any specific kind of calculation or function as I got one the other day after starting a new session and only setting my working directory and options. The code that triggered the fault and the system info would look like this:
#Set my working directory
setwd("~/Documents/School Spring 2013/Quaternary Dissasembly/Functional Diversity Basefile 3")
#Keep getting segfaults all the time. This might fix it
options(CBoundsCheck=T)
sessionInfo()
R version 3.0.1 (2013-05-16)
Platform: x86_64-apple-darwin10.8.0 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
Any help anyone could give me to find and fix the bug or the incorrect settings I have would be greatly appreciated. Thank you.
-M

Undo --no-restore in R

During the installation process I have set R to not restore the workspace and now want to undo this -
how is it done?
> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-pc-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=German_Austria.1252 LC_CTYPE=German_Austria.1252
[3] LC_MONETARY=German_Austria.1252 LC_NUMERIC=C
[5] LC_TIME=German_Austria.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
If you are using RGui from a windows shortcut, edit the short cut to remove the --no-restore flag.
If you are using R through, Rstudio, look under Tools-->Options-->General and select the appropriate option
For other IDEs there should be similar ways to set start-up options.
The other option would be to reinstall R the way you would like it to be done.

Resources