summaryrefslogtreecommitdiffhomepage
path: root/r.html.markdown
diff options
context:
space:
mode:
authorShivanshu <53912074+shivanshu-semwal@users.noreply.github.com>2022-01-03 21:53:08 +0530
committerGitHub <noreply@github.com>2022-01-04 00:23:08 +0800
commit5828962380f3a573b4e7a47b440d651890df628b (patch)
tree684326e17d9f5eed9aa430926dcf3d8a4282806a /r.html.markdown
parentda4f1ff4c8038ac2dccec7ec695453e32696139b (diff)
Fixed output. (#4157)
Fixed output provided in comments beside the command.
Diffstat (limited to 'r.html.markdown')
-rw-r--r--r.html.markdown4
1 files changed, 2 insertions, 2 deletions
diff --git a/r.html.markdown b/r.html.markdown
index 79af40ce..e90d5a97 100644
--- a/r.html.markdown
+++ b/r.html.markdown
@@ -377,8 +377,8 @@ vec[6] # NA
# You can find the length of your vector with length()
length(vec) # 4
# You can perform operations on entire vectors or subsets of vectors
-vec * 4 # 16 20 24 28
-vec[2:3] * 5 # 25 30
+vec * 4 # 32 36 40 44
+vec[2:3] * 5 # 45 50
any(vec[2:3] == 8) # FALSE
# and R has many built-in functions to summarize vectors
mean(vec) # 9.5