博文

目前显示的是 五月, 2015的博文

linux mint语言选项 丢失

sudo apt-get install mintlocale

R on vps tips Setting LC_COLLATE failed, using "C"

sudo apt-get install language-pack-en-base sudo dpkg-reconfigure locales    错误提示 “ Unable to connect to service ”  adduser xuefliang #非root用户组   vi /etc/rstudio/rserver.conf www-port = 8787 rsession-which-r=/usr/bin/R 用rstudio-server verify-installation进行验证     locale::facet::_S_create_c_locale name not valid解决方案    export LC_ALL="C"  

R计算排列和组合

图片
library(combinat) permn(3) length(permn(3)) combn(1000, 2) dim(combn(1000,2))[2] 组合(Combinations)和排列( Permutation )计算公式为 perm = function(n, x) {   return(factorial(n) / factorial(n-x)) } comb = function(n, x) {   return(factorial(n) / (factorial(x) * factorial(n-x))) } 组合数:choose(n, k) 注意:从n个中选出k个 阶乘(k!):factorial(k) 排列数:choose(n, k) * factorial(k)

R 语言求极限

library(rSymPy) sympy("limit(1/x, x, oo)") sympy("limit(1/x, x, 0)") sympy("limit(x*log(x), x, 0)")  sympy("limit(sin(x)/x*x, x, 0)") sympy("limit(exp(x)/x*x, x, 0)") sympy("limit(x**x, x, 0)") sympy("limit(x*exp(1)**-x, x, oo)")  ##**代表幂 sympy("limit((cos(x)-1)/x**2, x, 0)")