deleter: Deleter

Description Usage Arguments Value Examples

Description

This function deletes all observations of a chosen behavior code from the behavior stream

Usage

1
deleter(data, behaviorstream,code1)

Arguments

data

A dataframe or tibble

behaviorstream

A character vector representing the observation stream. Contains actor behaviors and environmental (or partner) consequences

code 1

A character indicating the code to be deleted

Value

Returns a tibble where indices in behaviorstream corresponding to code 1 are now removed from the behaviorstream.

Examples

 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
#> elevator
# A tibble: 14 x 3
#   VIDELT TAR   BEH
#    <dbl> <chr> <chr>
# 1      1 S     o
# 2      1 S     x
# 3      1 S     x
# 4      1 S     x
# 5      1 S     A
# 6      1 S     o
# 7      1 S     x
# 8      2 S     x
# 9      2 S     x
#10      2 S     A
#11      2 S     o
#12      2 S     o
#13      2 S     o
#14      2 S     x

#> deleter(elevator,BEH,"o")
#  VIDELT TAR BEH
#1      1   S   x
#2      1   S   x
#3      1   S   x
#4      1   S   A
#5      1   S   x
#6      2   S   x
#7      2   S   x
#8      2   S   A
#9      2   S   x

delaneyj1786/REINFORCINATOR documentation built on Jan. 14, 2022, 3:47 a.m.