-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.Rhistory
69 lines (69 loc) · 2.14 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
?plot
plot
setwd("/Users/martinvanderlinden/Documents/Github_repos/lindenutils")
devtools
install.packages("devtools")
install.packages("roxygen2")
devtools::create("lindenutils")
library(lindenutils)
lindenutils
ls("package:lindenutils")
lsf.str("package:lindenutils")
help(package = lindenutils)
rand_vect
library(lindenutils)
rand_vect
sample.vec
lindenutils:sample.vec
devtools::document()
getwd()
setwd("/Users/martinvanderlinden/Documents/Github_repos/lindenutils")
devtools::document()
devtools::install()
help(sample)
sample.vec(1:9, size = 3)
sample.vec(1:9, size = 12)
devtools::install()
devtools::document()
devtools::install()
#' Element-wise mean of two vectors a and b (https://stackoverflow.com/questions/13990125/sample-from-vector-of-varying-length-including-1)
#' @description Element-wise mean of two vectors a and b (https://stackoverflow.com/questions/13990125/sample-from-vector-of-varying-length-including-1)
#' @name pmean
#' @usage pmean(a,b, na.rm = TRUE)
#' @param a,b two vectors
#' @param na.rm whether \code{NA} should be ignored when computing means
#' @export
pmean <- function(a,b, na.rm = T){rowMeans(cbind(a, b), na.rm = na.rm)}
pmean(c(1,2), c(1,2,3))
pmean(c(1,2), c(2,3))
#' Element-wise mean of two vectors a and b (https://stackoverflow.com/questions/13990125/sample-from-vector-of-varying-length-including-1)
#' @description Element-wise mean of two vectors a and b (https://stackoverflow.com/questions/13990125/sample-from-vector-of-varying-length-including-1)
#' @name pmean
#' @usage pmean(a,b, na.rm = TRUE)
#' @param a,b two vectors
#' @param na.rm whether \code{NA} should be ignored when computing means
#' @export
pmean <- function(a,b, na.rm = F){rowMeans(cbind(a, b), na.rm = na.rm)}
pmean(c(1,2), c(2,3))
devtools::document()
devtools::document()
devtools::install()
devtools::document()
devtools::install()
library(lindenutils)
pw_mean
help(pw_mean)
devtools::document()
devtools::install()
devtools::document()
devtools::install()
devtools::document()
devtools::install()
setwd("~/Documents/Github_repos/lindenutils")
devtools::document()
devtools::install()
.rs.restartR()
.rs.restartR()
getwd()
devtools::document()
devtools::install()