重复测量方差分析 sunqi 2020/7/26 概述双因素的重复测量资料方差分析代码数据获得 library(tidyverse) library(ggpubr) library(rstatix) rm(list=ls()) set.seed(123) data("selfesteem2", package = "datarium") # 抽样 selfesteem2 %>% sample_n_by(treatment, size = 1) ## # A tibble: 2 ...
如demo(plotmath)演示数学注释(表达式)的情况 example() 自动执行命令的在线说明文档中的所有例子 工作环境 (envioronment) commandArgs() 查看启动R时的命令行参数 getwd() 查看当前工作目录 setwd() 设定当前工作目录 list.files() 列出当前目录下的文件,同dir file.info...
In order to use the str_remove and str_remove_all functions, we also need to install and load thestringr add-on package. install.packages("stringr")# Install stringr packagelibrary("stringr")# Load stringr package Example 1: Application of str_remove Function in R In this example, we...
02, mgp = c(0, 0.1, 0)) for (i in 1:k){ plot(date,to[,i], xlab="",ylab="",type="l",xaxs="i",col="ivory4", las=1, main=paste("A",i,'-',colnames(Y)[i],"TO all others"),ylim=c(floor(min(to)),ceiling(max(to))),tck=0.01,yaxs="i") grid(NA,NULL,lty=1...
When installing a binary package,install.packageswill abort the install if it detects that the package is already installed and is currently in use. In some circumstances (e.g. multiple instances ofRrunning at the same time and sharing a library) it will not detect a problem, but the install...
tidyverse包,分享整洁数据的基础设计理念、语法和数据结构。 核心软件包是ggplot2、dplyr、tidyr、readr、purrr、tibble、stringr和forcats,它们提供了建模、转换和可视化数据的功能。 其中,readr包用于读取数据,tidyr包用于整理数据,dplyr包用于数据转换,ggplot2包用于数据可视化,purrr包用于函数式编程。
Example 1: Application of str_replace Function in RAfter loading the stringr package, we can now apply the str_replace function as follows:str_replace(x, "c", "xxx") # Apply str_replace function # "a very nixxxe character string"...
File > New Project > Existing Directory 使用create_package()参数是已经存在的目录 使用usethis::use_rstudio() 在已经存在的源码包目录内部使用 注意在开发的时候,工作路径最好是源码包的top-level 元数据 DESCRIPTION 元数据是存储在DESCRIPYION中,Rstudio和devtools将含有该文件的目录就认为是包目录 ...
cor_gather(): takes a correlation matrix and collapses (or melt) it into long format data frame (paired list) cor_spread(): spread a long correlation data frame into wide format (correlation matrix). 相关矩阵取子集 cor_select(): subset a correlation matrix by selecting variables of interest...
R is a powerful programming language that comes with a wide catalog of built-in functions that can be called anytime. As a math-oriented language, R comes with a good number of functions to perform numeric operations. Below you can find a list of some of the most useful: print(). Disp...