摘要:
centOS具体版本:8.5.2111 nas盘挂载需要root权限,比如挂载在 /mnt/nas目录,命令如下: cd /mnt && mkdir nasmount -t cifs -o iocharset=utf8,username=账户名,password=密码 //192.xxx.xx.xx 阅读全文
摘要:
主要是针对数据框后面跟$变量,获取数据的情况。 df<-data.frame(A=c(1,2,3),B=c(6,7,8)) tmp<-"B" # df$tmp // 输出 NULL eval(parse(text = paste0("df$",tmp))) 阅读全文
摘要:
library(ggplot2) library(cowplot) df<-data.frame(K=LETTERS[1:4],V=c(10,20,100,60)) p1<-ggplot(df,aes(x=K,y=V,fill=K))+geom_bar(stat = 'identity')+ lab 阅读全文
摘要:
就像下面的这个例子,直接把要返回的类型包裹在一个枚举中,接收函数再根据结果分别处理。 1 use std::fs::File; 2 use std::io::BufReader; 3 use flate2::read::GzDecoder; 4 #[allow(non_camel_case_type 阅读全文
摘要:
fn main(){ // String 没有实现copy trait let line1 = String::new(); { let line1 = String::from("tmp"); // 离开作用域直接被释放 } println!("{}",line1); // 输入为空 // i32 阅读全文
摘要:
centos8 R语言安装stringi 失败,报错信息: checking whether the C++ compiler supports the long long type... no 解决办法: 去掉miniconda环境变量,然后执行 install.packages("stringi 阅读全文
摘要:
1 fn max<T: std::cmp::PartialOrd >(nn: &Vec<T>) -> &T { 2 let mut f = &nn[0]; 3 for i in nn{ 4 if i > f { 5 f = i; 6 } 7 } 8 f 9 } 10 fn main(){ 11 le 阅读全文
摘要:
1 struct Targ { 2 w:u32, 3 h:u32, 4 } 5 impl Targ { 6 fn aera(&self) -> u32 { 7 self.w * self.h 8 } 9 fn sround(&self) -> u32 { 10 (self.w + self.h ) 阅读全文
摘要:
##### 方法更新了:WSL + MobaXterm 取代虚拟机-更新版-腾讯云开发者社区-腾讯云 (tencent.com) windows子系统安装默认C盘,这里我们直接下载安装文件安装在我们指定的目录。 1、先去官方网站下载安装文件:https://docs.microsoft.com/zh 阅读全文