10 Mart 2018 Cumartesi

Turkish characters in Latex - Latex'te Türkçe karakterler

  • \^{a} - â (şapkalı a)
  • \^{A} - Â (şapkalı A)
  • \c{c} - ç
  • \c{C} - Ç
  • \u{g} - ğ
  • \u{G} -Ğ
  • {\i} - ı
  • \.{I} - İ
  • \"{o} - ö
  • \"{O} - Ö
  • \c{s} - ş
  • \c{S} - Ş
  • \"{u} - ü
  • \"{U} - Ü

6 Mart 2018 Salı

libjvm.so: cannot open shared object file: No such file or directory

If you are getting that error when trying to load rJava, Please try the approach below:
Steps:
  1. Find your R library location. Mine is /usr/lib/R/lib
  2. Find the libjvm.so file which is usually in the usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server path depending on which jre you're using. Check in $JAVA_HOME environment.
  3. Create a symlink using ln -s
    sudo ln -s /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/libjvm.so /usr/lib/R/lib/libjvm.so
  4. Restart R server

keyword : libjvm.so: cannot open shared object file: No such file or directory

4 Mart 2018 Pazar

devtools package of R

How to install bugfree devtools package to R, in Linux?

Current version (1.13.5) of devtools package unfortunately has a trivial, but need to be fixed, bug.

the R/run-source.r file, in the end has such a part :

  } else {
    if (length(r_files) > 1) {
      warning("Multiple R files in gist, using first.")
      which <- 1
    }
  }
  r_files[[which]]$raw_url
}

but it should be :

  } else {
    if (length(r_files) > 1) {
      warning("Multiple R files in gist, using first.")
    }
    which <- 1
  }
  r_files[[which]]$raw_url
}

After installation, I couldn't find how to fix it. So I have followed these steps:



  1. Download the package : https://cran.r-project.org/src/contrib/devtools_1.13.5.tar.gz
  2. Extract the package.
  3. Edit the R/run-source.r file to fix the bug. (Just swap the lines "which
  4. After doing that, md5sum of the file is changed. Calculate the new md5sum (with the command "md5sum run-source.r") and update the file "MD5", changing the line "a861a5eb5ec4cb26572b7f11e86c4046 *R/run-source.r" with correct md5sum of the file.
  5. Uninstall all installed packages of R. (I have deleted the folder ~/R/x86_64-pc-linux-gnu-library completely)
  6. Then install devtools package from your local, using the command : install.packages("the/full/path/devtools_1.13.5.tar.gz", repos = NULL, type="source")
  7. This command will return error : ERROR: dependencies ‘httr’, ‘memoise’, ‘whisker’, ‘digest’, ‘rstudioapi’, ‘jsonlite’, ‘git2r’, ‘withr’ are not available for package ‘devtools’
  8. Install all dependencies one by one. (install.packages("httr") install.packages("memoise") ...)
  9. After installing all dependencies, try again to install devtools from your local :  install.packages("the/full/path/devtools_1.13.5.tar.gz", repos = NULL, type="source")
  10. You are done.
keyword : "Error in r_files[[which]] : invalid subscript type 'closure'"