The first few task that is given is to create simple objects
#Task 1- Assign the number 42 to a variable called “life”.
life <- 42
print(life)
## [1] 42
#Task 2- Assign the integers from 1 to 1,000 to a variable called “numbers”.
numbers <- 1:1000
#Task 3- Assign the square root of each element in the variable “numbers” to a new variable called “roots”
roots <- sqrt(numbers)
This next task is to plot a graph between the “numbers” and “roots” objects we have created earlier.
#Task 4
num_root <- plot(numbers, roots, xlab = "numbers", ylab = "roots", main = "Relationship between numbers and roots")
print(num_root)
## NULL
The next task was to understand what the fucntion “abs” does.
#Task 5- Use R’s inbuilt help function to find out what the “abs()” function does
print(?abs)
## starting httpd help server ... done
Here is a brief description of the function:
Description abs(x) computes the absolute value of x, sqrt(x) computes the (principal) square root of x, � x .
The naming follows the standard for computer languages such as C or Fortran.
Usage abs(x) sqrt(x) Arguments x
a numeric or complex vector or array.
The next task is to create a histogram of 5000 random numbers from a normal distribution with a mean of 57 and standard deviation of 12.
#Task 6
set.seed(123)
random_numbers <- rnorm(5000, mean = 57, sd = 12)
task6 <- hist(random_numbers, main = "Task 6", xlab = "Value", col = "lightblue")
abline(v = mean(random_numbers), col = "red")
print(task6)
## $breaks
## [1] 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100
##
## $counts
## [1] 2 12 42 124 221 390 589 791 824 766 543 380 179 83 38 8 8
##
## $density
## [1] 0.00008 0.00048 0.00168 0.00496 0.00884 0.01560 0.02356 0.03164 0.03296
## [10] 0.03064 0.02172 0.01520 0.00716 0.00332 0.00152 0.00032 0.00032
##
## $mids
## [1] 17.5 22.5 27.5 32.5 37.5 42.5 47.5 52.5 57.5 62.5 67.5 72.5 77.5 82.5 87.5
## [16] 92.5 97.5
##
## $xname
## [1] "random_numbers"
##
## $equidist
## [1] TRUE
##
## attr(,"class")
## [1] "histogram"
The next task is to extract the first 83 values from the variable “numbers” and calculate the mean
# Task 7-
subset_numbers <- numbers[1:83]
mean_subset_numbers <- mean(subset_numbers)
print(mean_subset_numbers)
## [1] 42
Here we make a matrix called “myMatrix” from the variable “numbers”. The matrix will have 10 columns.
# Task 8
myMatrix <- matrix(numbers, ncol = 10)
To continue the task, we calculate the sum of the column 10 in “myMatrix”
# Task 9
sum_col_10 <- sum(myMatrix[, 10])
print(sum_col_10)
## [1] 95050
Next we make a list called “coursework” containing the variables “numbers”, “roots”, and “myMatrix”. Find out the class of each element in the list.
# Task 10
coursework <- list(numbers = numbers, roots = roots, myMatrix = myMatrix)
# Find out the class of each element in the list
class_coursework <- sapply(coursework, class)
Here we calculate the sum of the object “roots” by indexing the “coursework” list
# Task 11
sum_roots <- sum(coursework[["roots"]])
# Task 12
# Path to the current working directory
current_directory <- getwd()
# Current working directory
print(current_directory)
## [1] "C:/Users/Chloe Joseph/Documents"
Here is a list of contents from my working directory
# c) List the content of the working directory using the terminal
files <- list.files()
print(files)
## [1] "Applications" "Custom Office Templates"
## [3] "Default.rdp" "desktop.ini"
## [5] "IBDP" "My Music"
## [7] "My Pictures" "My Videos"
## [9] "OneNote Notebooks" "owls.csv"
## [11] "R-assessment-1.html" "R-assessment-1.Rmd"
## [13] "R-assessment-1_files" "R assessment 1.Rmd"
Let’s import the “owls” data set
# Task 13- Import the file “owls.csv” into R and inspect the first 10 lines of the dataset.
owls_data <- read.csv("owls.csv")
table1 <- head(owls_data, 10)
print(table1)
## X common.name latin size.cm wingspan.cm weight.g
## 1 1 Barn Owl Tyto alba 41.76713 104.0338 464.8648
## 2 2 Barn Owl Tyto alba 41.95082 110.0214 457.1181
## 3 3 Barn Owl Tyto alba 38.52050 108.3817 463.8821
## 4 4 Barn Owl Tyto alba 41.62556 104.0448 460.2816
## 5 5 Barn Owl Tyto alba 39.02970 108.8678 464.7712
## 6 6 Barn Owl Tyto alba 41.58190 104.1891 462.2993
## 7 7 Barn Owl Tyto alba 42.14086 107.6116 459.6003
## 8 8 Barn Owl Tyto alba 40.93317 108.6951 459.8983
## 9 9 Barn Owl Tyto alba 43.58364 106.9494 462.5507
## 10 10 Barn Owl Tyto alba 39.24096 107.8284 459.0347
# Task 14- Calculate the mean and standard deviation wingspan for barn owls.
mean_wingspan <- mean(owls_data$wingspan[owls_data$species == "Barn Owl"])
sd_wingspan <- sd(owls_data$wingspan[owls_data$species == "Barn Owl"])
print(mean_wingspan)
## [1] NaN
print(sd_wingspan)
## [1] NA
# Task 15- Make a table to summarise the mean “size”, “wingspan”, and “weight” for each species of owl.
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
This table summarises the mean size, wingspan and weight for each species
# Summarize the mean size, wingspan, and weight for each species
summary_table <- owls_data %>%
group_by(common.name) %>%
summarise(
mean_size = mean(size.cm, na.rm = TRUE),
mean_wingspan = mean(wingspan.cm, na.rm = TRUE),
mean_weight = mean(weight.g, na.rm = TRUE)
)
# Print the summary table
print(summary_table)
## # A tibble: 8 × 4
## common.name mean_size mean_wingspan mean_weight
## <chr> <dbl> <dbl> <dbl>
## 1 Barn Owl 40.9 107. 461.
## 2 Great Grey Owl 70.1 151. 1004.
## 3 Great Horned Owl 52.1 110. 1381.
## 4 Long-eared Owl 36.5 99.6 251.
## 5 Northern Hawk Owl 40.1 70.5 326.
## 6 Northern Saw-whet Owl 18.3 39.5 80.4
## 7 Short-eared Owl 36.6 100. 346.
## 8 Snowy Owl 59.8 124. 1303.
Here are the first 6 lines of the new data set as per the task 16 instructions
# Task 16- Create a new column to the data that gives the weight of the owls in kilograms rather than grams. Inspect the first 6 lines of the new dataset.
weight <- owls_data$weight.g / 1000
table2 <- head(owls_data, 6)
print(table2)
## X common.name latin size.cm wingspan.cm weight.g
## 1 1 Barn Owl Tyto alba 41.76713 104.0338 464.8648
## 2 2 Barn Owl Tyto alba 41.95082 110.0214 457.1181
## 3 3 Barn Owl Tyto alba 38.52050 108.3817 463.8821
## 4 4 Barn Owl Tyto alba 41.62556 104.0448 460.2816
## 5 5 Barn Owl Tyto alba 39.02970 108.8678 464.7712
## 6 6 Barn Owl Tyto alba 41.58190 104.1891 462.2993
Here is a graph to show the distribution of wingspan for each owl species
# Task 17
library(ggplot2)
wingspan <- ggplot(owls_data, aes(x = owls_data$wingspan.cm, fill = owls_data$common.name)) +
geom_density(alpha = 0.5) +
labs(title = "Distribution of Wingspan for Each Species of Owl",
x = "Wingspan (cm)", # Change the x-axis label
y = "Density" # Change the y-axis label
)
print(wingspan)
## Warning: Use of `owls_data$wingspan.cm` is discouraged.
## ℹ Use `wingspan.cm` instead.
## Warning: Use of `owls_data$common.name` is discouraged.
## ℹ Use `common.name` instead.
The next graph is a plot to show the relationship between size and wingspan. Data points for each species of owl should be easily distinguishable on the plot.
# Task 18
size <- ggplot(owls_data, aes(x = owls_data$size.cm, y = owls_data$wingspan.cm, color = owls_data$common.name)) +
geom_point() +
labs(
title = "Relationship between Size and Wingspan",
x = "Size", # Change the x-axis label
y = "Wingspan" # Change the y-axis label
)
print(size)
## Warning: Use of `owls_data$size.cm` is discouraged.
## ℹ Use `size.cm` instead.
## Warning: Use of `owls_data$wingspan.cm` is discouraged.
## ℹ Use `wingspan.cm` instead.
## Warning: Use of `owls_data$common.name` is discouraged.
## ℹ Use `common.name` instead.
And this one is remaking the plot from task 17 but with a different facet for each species of owl.
# Task 19
wingspan2 <- ggplot(owls_data, aes(x = owls_data$wingspan.cm, fill = owls_data$common.name)) +
geom_density(alpha = 0.5) +
facet_wrap(~owls_data$common.name) +
labs(title = "Distribution of Wingspan for Each Species of Owl")
print(wingspan2)
## Warning: Use of `owls_data$wingspan.cm` is discouraged.
## ℹ Use `wingspan.cm` instead.
## Warning: Use of `owls_data$common.name` is discouraged.
## ℹ Use `common.name` instead.
**The last task is to remake the plot from task 18 by subseting the data for owls with a wingspan of more than 75 cm
# Task 20
SizeWingspan <- ggplot(owls_data[owls_data$wingspan.cm > 75, ], aes(x = size.cm, y = wingspan.cm, color = common.name)) +
geom_point() +
labs(
title = "Relationship between Size and Wingspan (Wingspan > 75 cm)",
x = "Size",
y = "Wingspan"
)
print(SizeWingspan)
print(numbers)
## [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14
## [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28
## [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42
## [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56
## [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70
## [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84
## [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98
## [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112
## [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126
## [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140
## [141] 141 142 143 144 145 146 147 148 149 150 151 152 153 154
## [155] 155 156 157 158 159 160 161 162 163 164 165 166 167 168
## [169] 169 170 171 172 173 174 175 176 177 178 179 180 181 182
## [183] 183 184 185 186 187 188 189 190 191 192 193 194 195 196
## [197] 197 198 199 200 201 202 203 204 205 206 207 208 209 210
## [211] 211 212 213 214 215 216 217 218 219 220 221 222 223 224
## [225] 225 226 227 228 229 230 231 232 233 234 235 236 237 238
## [239] 239 240 241 242 243 244 245 246 247 248 249 250 251 252
## [253] 253 254 255 256 257 258 259 260 261 262 263 264 265 266
## [267] 267 268 269 270 271 272 273 274 275 276 277 278 279 280
## [281] 281 282 283 284 285 286 287 288 289 290 291 292 293 294
## [295] 295 296 297 298 299 300 301 302 303 304 305 306 307 308
## [309] 309 310 311 312 313 314 315 316 317 318 319 320 321 322
## [323] 323 324 325 326 327 328 329 330 331 332 333 334 335 336
## [337] 337 338 339 340 341 342 343 344 345 346 347 348 349 350
## [351] 351 352 353 354 355 356 357 358 359 360 361 362 363 364
## [365] 365 366 367 368 369 370 371 372 373 374 375 376 377 378
## [379] 379 380 381 382 383 384 385 386 387 388 389 390 391 392
## [393] 393 394 395 396 397 398 399 400 401 402 403 404 405 406
## [407] 407 408 409 410 411 412 413 414 415 416 417 418 419 420
## [421] 421 422 423 424 425 426 427 428 429 430 431 432 433 434
## [435] 435 436 437 438 439 440 441 442 443 444 445 446 447 448
## [449] 449 450 451 452 453 454 455 456 457 458 459 460 461 462
## [463] 463 464 465 466 467 468 469 470 471 472 473 474 475 476
## [477] 477 478 479 480 481 482 483 484 485 486 487 488 489 490
## [491] 491 492 493 494 495 496 497 498 499 500 501 502 503 504
## [505] 505 506 507 508 509 510 511 512 513 514 515 516 517 518
## [519] 519 520 521 522 523 524 525 526 527 528 529 530 531 532
## [533] 533 534 535 536 537 538 539 540 541 542 543 544 545 546
## [547] 547 548 549 550 551 552 553 554 555 556 557 558 559 560
## [561] 561 562 563 564 565 566 567 568 569 570 571 572 573 574
## [575] 575 576 577 578 579 580 581 582 583 584 585 586 587 588
## [589] 589 590 591 592 593 594 595 596 597 598 599 600 601 602
## [603] 603 604 605 606 607 608 609 610 611 612 613 614 615 616
## [617] 617 618 619 620 621 622 623 624 625 626 627 628 629 630
## [631] 631 632 633 634 635 636 637 638 639 640 641 642 643 644
## [645] 645 646 647 648 649 650 651 652 653 654 655 656 657 658
## [659] 659 660 661 662 663 664 665 666 667 668 669 670 671 672
## [673] 673 674 675 676 677 678 679 680 681 682 683 684 685 686
## [687] 687 688 689 690 691 692 693 694 695 696 697 698 699 700
## [701] 701 702 703 704 705 706 707 708 709 710 711 712 713 714
## [715] 715 716 717 718 719 720 721 722 723 724 725 726 727 728
## [729] 729 730 731 732 733 734 735 736 737 738 739 740 741 742
## [743] 743 744 745 746 747 748 749 750 751 752 753 754 755 756
## [757] 757 758 759 760 761 762 763 764 765 766 767 768 769 770
## [771] 771 772 773 774 775 776 777 778 779 780 781 782 783 784
## [785] 785 786 787 788 789 790 791 792 793 794 795 796 797 798
## [799] 799 800 801 802 803 804 805 806 807 808 809 810 811 812
## [813] 813 814 815 816 817 818 819 820 821 822 823 824 825 826
## [827] 827 828 829 830 831 832 833 834 835 836 837 838 839 840
## [841] 841 842 843 844 845 846 847 848 849 850 851 852 853 854
## [855] 855 856 857 858 859 860 861 862 863 864 865 866 867 868
## [869] 869 870 871 872 873 874 875 876 877 878 879 880 881 882
## [883] 883 884 885 886 887 888 889 890 891 892 893 894 895 896
## [897] 897 898 899 900 901 902 903 904 905 906 907 908 909 910
## [911] 911 912 913 914 915 916 917 918 919 920 921 922 923 924
## [925] 925 926 927 928 929 930 931 932 933 934 935 936 937 938
## [939] 939 940 941 942 943 944 945 946 947 948 949 950 951 952
## [953] 953 954 955 956 957 958 959 960 961 962 963 964 965 966
## [967] 967 968 969 970 971 972 973 974 975 976 977 978 979 980
## [981] 981 982 983 984 985 986 987 988 989 990 991 992 993 994
## [995] 995 996 997 998 999 1000
print(roots)
## [1] 1.000000 1.414214 1.732051 2.000000 2.236068 2.449490 2.645751
## [8] 2.828427 3.000000 3.162278 3.316625 3.464102 3.605551 3.741657
## [15] 3.872983 4.000000 4.123106 4.242641 4.358899 4.472136 4.582576
## [22] 4.690416 4.795832 4.898979 5.000000 5.099020 5.196152 5.291503
## [29] 5.385165 5.477226 5.567764 5.656854 5.744563 5.830952 5.916080
## [36] 6.000000 6.082763 6.164414 6.244998 6.324555 6.403124 6.480741
## [43] 6.557439 6.633250 6.708204 6.782330 6.855655 6.928203 7.000000
## [50] 7.071068 7.141428 7.211103 7.280110 7.348469 7.416198 7.483315
## [57] 7.549834 7.615773 7.681146 7.745967 7.810250 7.874008 7.937254
## [64] 8.000000 8.062258 8.124038 8.185353 8.246211 8.306624 8.366600
## [71] 8.426150 8.485281 8.544004 8.602325 8.660254 8.717798 8.774964
## [78] 8.831761 8.888194 8.944272 9.000000 9.055385 9.110434 9.165151
## [85] 9.219544 9.273618 9.327379 9.380832 9.433981 9.486833 9.539392
## [92] 9.591663 9.643651 9.695360 9.746794 9.797959 9.848858 9.899495
## [99] 9.949874 10.000000 10.049876 10.099505 10.148892 10.198039 10.246951
## [106] 10.295630 10.344080 10.392305 10.440307 10.488088 10.535654 10.583005
## [113] 10.630146 10.677078 10.723805 10.770330 10.816654 10.862780 10.908712
## [120] 10.954451 11.000000 11.045361 11.090537 11.135529 11.180340 11.224972
## [127] 11.269428 11.313708 11.357817 11.401754 11.445523 11.489125 11.532563
## [134] 11.575837 11.618950 11.661904 11.704700 11.747340 11.789826 11.832160
## [141] 11.874342 11.916375 11.958261 12.000000 12.041595 12.083046 12.124356
## [148] 12.165525 12.206556 12.247449 12.288206 12.328828 12.369317 12.409674
## [155] 12.449900 12.489996 12.529964 12.569805 12.609520 12.649111 12.688578
## [162] 12.727922 12.767145 12.806248 12.845233 12.884099 12.922848 12.961481
## [169] 13.000000 13.038405 13.076697 13.114877 13.152946 13.190906 13.228757
## [176] 13.266499 13.304135 13.341664 13.379088 13.416408 13.453624 13.490738
## [183] 13.527749 13.564660 13.601471 13.638182 13.674794 13.711309 13.747727
## [190] 13.784049 13.820275 13.856406 13.892444 13.928388 13.964240 14.000000
## [197] 14.035669 14.071247 14.106736 14.142136 14.177447 14.212670 14.247807
## [204] 14.282857 14.317821 14.352700 14.387495 14.422205 14.456832 14.491377
## [211] 14.525839 14.560220 14.594520 14.628739 14.662878 14.696938 14.730920
## [218] 14.764823 14.798649 14.832397 14.866069 14.899664 14.933185 14.966630
## [225] 15.000000 15.033296 15.066519 15.099669 15.132746 15.165751 15.198684
## [232] 15.231546 15.264338 15.297059 15.329710 15.362291 15.394804 15.427249
## [239] 15.459625 15.491933 15.524175 15.556349 15.588457 15.620499 15.652476
## [246] 15.684387 15.716234 15.748016 15.779734 15.811388 15.842980 15.874508
## [253] 15.905974 15.937377 15.968719 16.000000 16.031220 16.062378 16.093477
## [260] 16.124515 16.155494 16.186414 16.217275 16.248077 16.278821 16.309506
## [267] 16.340135 16.370706 16.401219 16.431677 16.462078 16.492423 16.522712
## [274] 16.552945 16.583124 16.613248 16.643317 16.673332 16.703293 16.733201
## [281] 16.763055 16.792856 16.822604 16.852300 16.881943 16.911535 16.941074
## [288] 16.970563 17.000000 17.029386 17.058722 17.088007 17.117243 17.146428
## [295] 17.175564 17.204651 17.233688 17.262677 17.291616 17.320508 17.349352
## [302] 17.378147 17.406895 17.435596 17.464249 17.492856 17.521415 17.549929
## [309] 17.578396 17.606817 17.635192 17.663522 17.691806 17.720045 17.748239
## [316] 17.776389 17.804494 17.832555 17.860571 17.888544 17.916473 17.944358
## [323] 17.972201 18.000000 18.027756 18.055470 18.083141 18.110770 18.138357
## [330] 18.165902 18.193405 18.220867 18.248288 18.275667 18.303005 18.330303
## [337] 18.357560 18.384776 18.411953 18.439089 18.466185 18.493242 18.520259
## [344] 18.547237 18.574176 18.601075 18.627936 18.654758 18.681542 18.708287
## [351] 18.734994 18.761663 18.788294 18.814888 18.841444 18.867962 18.894444
## [358] 18.920888 18.947295 18.973666 19.000000 19.026298 19.052559 19.078784
## [365] 19.104973 19.131126 19.157244 19.183326 19.209373 19.235384 19.261360
## [372] 19.287302 19.313208 19.339080 19.364917 19.390719 19.416488 19.442222
## [379] 19.467922 19.493589 19.519221 19.544820 19.570386 19.595918 19.621417
## [386] 19.646883 19.672316 19.697716 19.723083 19.748418 19.773720 19.798990
## [393] 19.824228 19.849433 19.874607 19.899749 19.924859 19.949937 19.974984
## [400] 20.000000 20.024984 20.049938 20.074860 20.099751 20.124612 20.149442
## [407] 20.174241 20.199010 20.223748 20.248457 20.273135 20.297783 20.322401
## [414] 20.346990 20.371549 20.396078 20.420578 20.445048 20.469489 20.493902
## [421] 20.518285 20.542639 20.566964 20.591260 20.615528 20.639767 20.663978
## [428] 20.688161 20.712315 20.736441 20.760539 20.784610 20.808652 20.832667
## [435] 20.856654 20.880613 20.904545 20.928450 20.952327 20.976177 21.000000
## [442] 21.023796 21.047565 21.071308 21.095023 21.118712 21.142375 21.166010
## [449] 21.189620 21.213203 21.236761 21.260292 21.283797 21.307276 21.330729
## [456] 21.354157 21.377558 21.400935 21.424285 21.447611 21.470911 21.494185
## [463] 21.517435 21.540659 21.563859 21.587033 21.610183 21.633308 21.656408
## [470] 21.679483 21.702534 21.725561 21.748563 21.771541 21.794495 21.817424
## [477] 21.840330 21.863211 21.886069 21.908902 21.931712 21.954498 21.977261
## [484] 22.000000 22.022716 22.045408 22.068076 22.090722 22.113344 22.135944
## [491] 22.158520 22.181073 22.203603 22.226111 22.248595 22.271057 22.293497
## [498] 22.315914 22.338308 22.360680 22.383029 22.405357 22.427661 22.449944
## [505] 22.472205 22.494444 22.516660 22.538855 22.561028 22.583180 22.605309
## [512] 22.627417 22.649503 22.671568 22.693611 22.715633 22.737634 22.759613
## [519] 22.781571 22.803509 22.825424 22.847319 22.869193 22.891046 22.912878
## [526] 22.934690 22.956481 22.978251 23.000000 23.021729 23.043437 23.065125
## [533] 23.086793 23.108440 23.130067 23.151674 23.173260 23.194827 23.216374
## [540] 23.237900 23.259407 23.280893 23.302360 23.323808 23.345235 23.366643
## [547] 23.388031 23.409400 23.430749 23.452079 23.473389 23.494680 23.515952
## [554] 23.537205 23.558438 23.579652 23.600847 23.622024 23.643181 23.664319
## [561] 23.685439 23.706539 23.727621 23.748684 23.769729 23.790755 23.811762
## [568] 23.832751 23.853721 23.874673 23.895606 23.916521 23.937418 23.958297
## [575] 23.979158 24.000000 24.020824 24.041631 24.062419 24.083189 24.103942
## [582] 24.124676 24.145393 24.166092 24.186773 24.207437 24.228083 24.248711
## [589] 24.269322 24.289916 24.310492 24.331050 24.351591 24.372115 24.392622
## [596] 24.413111 24.433583 24.454039 24.474477 24.494897 24.515301 24.535688
## [603] 24.556058 24.576411 24.596748 24.617067 24.637370 24.657656 24.677925
## [610] 24.698178 24.718414 24.738634 24.758837 24.779023 24.799194 24.819347
## [617] 24.839485 24.859606 24.879711 24.899799 24.919872 24.939928 24.959968
## [624] 24.979992 25.000000 25.019992 25.039968 25.059928 25.079872 25.099801
## [631] 25.119713 25.139610 25.159491 25.179357 25.199206 25.219040 25.238859
## [638] 25.258662 25.278449 25.298221 25.317978 25.337719 25.357445 25.377155
## [645] 25.396850 25.416530 25.436195 25.455844 25.475478 25.495098 25.514702
## [652] 25.534291 25.553865 25.573424 25.592968 25.612497 25.632011 25.651511
## [659] 25.670995 25.690465 25.709920 25.729361 25.748786 25.768197 25.787594
## [666] 25.806976 25.826343 25.845696 25.865034 25.884358 25.903668 25.922963
## [673] 25.942244 25.961510 25.980762 26.000000 26.019224 26.038433 26.057628
## [680] 26.076810 26.095977 26.115130 26.134269 26.153394 26.172505 26.191602
## [687] 26.210685 26.229754 26.248809 26.267851 26.286879 26.305893 26.324893
## [694] 26.343880 26.362853 26.381812 26.400758 26.419690 26.438608 26.457513
## [701] 26.476405 26.495283 26.514147 26.532998 26.551836 26.570661 26.589472
## [708] 26.608269 26.627054 26.645825 26.664583 26.683328 26.702060 26.720778
## [715] 26.739484 26.758176 26.776856 26.795522 26.814175 26.832816 26.851443
## [722] 26.870058 26.888659 26.907248 26.925824 26.944387 26.962938 26.981475
## [729] 27.000000 27.018512 27.037012 27.055499 27.073973 27.092434 27.110883
## [736] 27.129320 27.147744 27.166155 27.184554 27.202941 27.221315 27.239677
## [743] 27.258026 27.276363 27.294688 27.313001 27.331301 27.349589 27.367864
## [750] 27.386128 27.404379 27.422618 27.440845 27.459060 27.477263 27.495454
## [757] 27.513633 27.531800 27.549955 27.568098 27.586228 27.604347 27.622455
## [764] 27.640550 27.658633 27.676705 27.694765 27.712813 27.730849 27.748874
## [771] 27.766887 27.784888 27.802878 27.820855 27.838822 27.856777 27.874720
## [778] 27.892651 27.910571 27.928480 27.946377 27.964263 27.982137 28.000000
## [785] 28.017851 28.035692 28.053520 28.071338 28.089144 28.106939 28.124722
## [792] 28.142495 28.160256 28.178006 28.195744 28.213472 28.231188 28.248894
## [799] 28.266588 28.284271 28.301943 28.319605 28.337255 28.354894 28.372522
## [806] 28.390139 28.407745 28.425341 28.442925 28.460499 28.478062 28.495614
## [813] 28.513155 28.530685 28.548205 28.565714 28.583212 28.600699 28.618176
## [820] 28.635642 28.653098 28.670542 28.687977 28.705400 28.722813 28.740216
## [827] 28.757608 28.774989 28.792360 28.809721 28.827071 28.844410 28.861739
## [834] 28.879058 28.896367 28.913665 28.930952 28.948230 28.965497 28.982753
## [841] 29.000000 29.017236 29.034462 29.051678 29.068884 29.086079 29.103264
## [848] 29.120440 29.137605 29.154759 29.171904 29.189039 29.206164 29.223278
## [855] 29.240383 29.257478 29.274562 29.291637 29.308702 29.325757 29.342802
## [862] 29.359837 29.376862 29.393877 29.410882 29.427878 29.444864 29.461840
## [869] 29.478806 29.495762 29.512709 29.529646 29.546573 29.563491 29.580399
## [876] 29.597297 29.614186 29.631065 29.647934 29.664794 29.681644 29.698485
## [883] 29.715316 29.732137 29.748950 29.765752 29.782545 29.799329 29.816103
## [890] 29.832868 29.849623 29.866369 29.883106 29.899833 29.916551 29.933259
## [897] 29.949958 29.966648 29.983329 30.000000 30.016662 30.033315 30.049958
## [904] 30.066593 30.083218 30.099834 30.116441 30.133038 30.149627 30.166206
## [911] 30.182777 30.199338 30.215890 30.232433 30.248967 30.265492 30.282008
## [918] 30.298515 30.315013 30.331502 30.347982 30.364453 30.380915 30.397368
## [925] 30.413813 30.430248 30.446675 30.463092 30.479501 30.495901 30.512293
## [932] 30.528675 30.545049 30.561414 30.577770 30.594117 30.610456 30.626786
## [939] 30.643107 30.659419 30.675723 30.692019 30.708305 30.724583 30.740852
## [946] 30.757113 30.773365 30.789609 30.805844 30.822070 30.838288 30.854497
## [953] 30.870698 30.886890 30.903074 30.919250 30.935417 30.951575 30.967725
## [960] 30.983867 31.000000 31.016125 31.032241 31.048349 31.064449 31.080541
## [967] 31.096624 31.112698 31.128765 31.144823 31.160873 31.176915 31.192948
## [974] 31.208973 31.224990 31.240999 31.256999 31.272992 31.288976 31.304952
## [981] 31.320920 31.336879 31.352831 31.368774 31.384710 31.400637 31.416556
## [988] 31.432467 31.448370 31.464265 31.480152 31.496031 31.511903 31.527766
## [995] 31.543621 31.559468 31.575307 31.591138 31.606961 31.622777
print(myMatrix)
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
## [1,] 1 101 201 301 401 501 601 701 801 901
## [2,] 2 102 202 302 402 502 602 702 802 902
## [3,] 3 103 203 303 403 503 603 703 803 903
## [4,] 4 104 204 304 404 504 604 704 804 904
## [5,] 5 105 205 305 405 505 605 705 805 905
## [6,] 6 106 206 306 406 506 606 706 806 906
## [7,] 7 107 207 307 407 507 607 707 807 907
## [8,] 8 108 208 308 408 508 608 708 808 908
## [9,] 9 109 209 309 409 509 609 709 809 909
## [10,] 10 110 210 310 410 510 610 710 810 910
## [11,] 11 111 211 311 411 511 611 711 811 911
## [12,] 12 112 212 312 412 512 612 712 812 912
## [13,] 13 113 213 313 413 513 613 713 813 913
## [14,] 14 114 214 314 414 514 614 714 814 914
## [15,] 15 115 215 315 415 515 615 715 815 915
## [16,] 16 116 216 316 416 516 616 716 816 916
## [17,] 17 117 217 317 417 517 617 717 817 917
## [18,] 18 118 218 318 418 518 618 718 818 918
## [19,] 19 119 219 319 419 519 619 719 819 919
## [20,] 20 120 220 320 420 520 620 720 820 920
## [21,] 21 121 221 321 421 521 621 721 821 921
## [22,] 22 122 222 322 422 522 622 722 822 922
## [23,] 23 123 223 323 423 523 623 723 823 923
## [24,] 24 124 224 324 424 524 624 724 824 924
## [25,] 25 125 225 325 425 525 625 725 825 925
## [26,] 26 126 226 326 426 526 626 726 826 926
## [27,] 27 127 227 327 427 527 627 727 827 927
## [28,] 28 128 228 328 428 528 628 728 828 928
## [29,] 29 129 229 329 429 529 629 729 829 929
## [30,] 30 130 230 330 430 530 630 730 830 930
## [31,] 31 131 231 331 431 531 631 731 831 931
## [32,] 32 132 232 332 432 532 632 732 832 932
## [33,] 33 133 233 333 433 533 633 733 833 933
## [34,] 34 134 234 334 434 534 634 734 834 934
## [35,] 35 135 235 335 435 535 635 735 835 935
## [36,] 36 136 236 336 436 536 636 736 836 936
## [37,] 37 137 237 337 437 537 637 737 837 937
## [38,] 38 138 238 338 438 538 638 738 838 938
## [39,] 39 139 239 339 439 539 639 739 839 939
## [40,] 40 140 240 340 440 540 640 740 840 940
## [41,] 41 141 241 341 441 541 641 741 841 941
## [42,] 42 142 242 342 442 542 642 742 842 942
## [43,] 43 143 243 343 443 543 643 743 843 943
## [44,] 44 144 244 344 444 544 644 744 844 944
## [45,] 45 145 245 345 445 545 645 745 845 945
## [46,] 46 146 246 346 446 546 646 746 846 946
## [47,] 47 147 247 347 447 547 647 747 847 947
## [48,] 48 148 248 348 448 548 648 748 848 948
## [49,] 49 149 249 349 449 549 649 749 849 949
## [50,] 50 150 250 350 450 550 650 750 850 950
## [51,] 51 151 251 351 451 551 651 751 851 951
## [52,] 52 152 252 352 452 552 652 752 852 952
## [53,] 53 153 253 353 453 553 653 753 853 953
## [54,] 54 154 254 354 454 554 654 754 854 954
## [55,] 55 155 255 355 455 555 655 755 855 955
## [56,] 56 156 256 356 456 556 656 756 856 956
## [57,] 57 157 257 357 457 557 657 757 857 957
## [58,] 58 158 258 358 458 558 658 758 858 958
## [59,] 59 159 259 359 459 559 659 759 859 959
## [60,] 60 160 260 360 460 560 660 760 860 960
## [61,] 61 161 261 361 461 561 661 761 861 961
## [62,] 62 162 262 362 462 562 662 762 862 962
## [63,] 63 163 263 363 463 563 663 763 863 963
## [64,] 64 164 264 364 464 564 664 764 864 964
## [65,] 65 165 265 365 465 565 665 765 865 965
## [66,] 66 166 266 366 466 566 666 766 866 966
## [67,] 67 167 267 367 467 567 667 767 867 967
## [68,] 68 168 268 368 468 568 668 768 868 968
## [69,] 69 169 269 369 469 569 669 769 869 969
## [70,] 70 170 270 370 470 570 670 770 870 970
## [71,] 71 171 271 371 471 571 671 771 871 971
## [72,] 72 172 272 372 472 572 672 772 872 972
## [73,] 73 173 273 373 473 573 673 773 873 973
## [74,] 74 174 274 374 474 574 674 774 874 974
## [75,] 75 175 275 375 475 575 675 775 875 975
## [76,] 76 176 276 376 476 576 676 776 876 976
## [77,] 77 177 277 377 477 577 677 777 877 977
## [78,] 78 178 278 378 478 578 678 778 878 978
## [79,] 79 179 279 379 479 579 679 779 879 979
## [80,] 80 180 280 380 480 580 680 780 880 980
## [81,] 81 181 281 381 481 581 681 781 881 981
## [82,] 82 182 282 382 482 582 682 782 882 982
## [83,] 83 183 283 383 483 583 683 783 883 983
## [84,] 84 184 284 384 484 584 684 784 884 984
## [85,] 85 185 285 385 485 585 685 785 885 985
## [86,] 86 186 286 386 486 586 686 786 886 986
## [87,] 87 187 287 387 487 587 687 787 887 987
## [88,] 88 188 288 388 488 588 688 788 888 988
## [89,] 89 189 289 389 489 589 689 789 889 989
## [90,] 90 190 290 390 490 590 690 790 890 990
## [91,] 91 191 291 391 491 591 691 791 891 991
## [92,] 92 192 292 392 492 592 692 792 892 992
## [93,] 93 193 293 393 493 593 693 793 893 993
## [94,] 94 194 294 394 494 594 694 794 894 994
## [95,] 95 195 295 395 495 595 695 795 895 995
## [96,] 96 196 296 396 496 596 696 796 896 996
## [97,] 97 197 297 397 497 597 697 797 897 997
## [98,] 98 198 298 398 498 598 698 798 898 998
## [99,] 99 199 299 399 499 599 699 799 899 999
## [100,] 100 200 300 400 500 600 700 800 900 1000
print(coursework)
## $numbers
## [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14
## [15] 15 16 17 18 19 20 21 22 23 24 25 26 27 28
## [29] 29 30 31 32 33 34 35 36 37 38 39 40 41 42
## [43] 43 44 45 46 47 48 49 50 51 52 53 54 55 56
## [57] 57 58 59 60 61 62 63 64 65 66 67 68 69 70
## [71] 71 72 73 74 75 76 77 78 79 80 81 82 83 84
## [85] 85 86 87 88 89 90 91 92 93 94 95 96 97 98
## [99] 99 100 101 102 103 104 105 106 107 108 109 110 111 112
## [113] 113 114 115 116 117 118 119 120 121 122 123 124 125 126
## [127] 127 128 129 130 131 132 133 134 135 136 137 138 139 140
## [141] 141 142 143 144 145 146 147 148 149 150 151 152 153 154
## [155] 155 156 157 158 159 160 161 162 163 164 165 166 167 168
## [169] 169 170 171 172 173 174 175 176 177 178 179 180 181 182
## [183] 183 184 185 186 187 188 189 190 191 192 193 194 195 196
## [197] 197 198 199 200 201 202 203 204 205 206 207 208 209 210
## [211] 211 212 213 214 215 216 217 218 219 220 221 222 223 224
## [225] 225 226 227 228 229 230 231 232 233 234 235 236 237 238
## [239] 239 240 241 242 243 244 245 246 247 248 249 250 251 252
## [253] 253 254 255 256 257 258 259 260 261 262 263 264 265 266
## [267] 267 268 269 270 271 272 273 274 275 276 277 278 279 280
## [281] 281 282 283 284 285 286 287 288 289 290 291 292 293 294
## [295] 295 296 297 298 299 300 301 302 303 304 305 306 307 308
## [309] 309 310 311 312 313 314 315 316 317 318 319 320 321 322
## [323] 323 324 325 326 327 328 329 330 331 332 333 334 335 336
## [337] 337 338 339 340 341 342 343 344 345 346 347 348 349 350
## [351] 351 352 353 354 355 356 357 358 359 360 361 362 363 364
## [365] 365 366 367 368 369 370 371 372 373 374 375 376 377 378
## [379] 379 380 381 382 383 384 385 386 387 388 389 390 391 392
## [393] 393 394 395 396 397 398 399 400 401 402 403 404 405 406
## [407] 407 408 409 410 411 412 413 414 415 416 417 418 419 420
## [421] 421 422 423 424 425 426 427 428 429 430 431 432 433 434
## [435] 435 436 437 438 439 440 441 442 443 444 445 446 447 448
## [449] 449 450 451 452 453 454 455 456 457 458 459 460 461 462
## [463] 463 464 465 466 467 468 469 470 471 472 473 474 475 476
## [477] 477 478 479 480 481 482 483 484 485 486 487 488 489 490
## [491] 491 492 493 494 495 496 497 498 499 500 501 502 503 504
## [505] 505 506 507 508 509 510 511 512 513 514 515 516 517 518
## [519] 519 520 521 522 523 524 525 526 527 528 529 530 531 532
## [533] 533 534 535 536 537 538 539 540 541 542 543 544 545 546
## [547] 547 548 549 550 551 552 553 554 555 556 557 558 559 560
## [561] 561 562 563 564 565 566 567 568 569 570 571 572 573 574
## [575] 575 576 577 578 579 580 581 582 583 584 585 586 587 588
## [589] 589 590 591 592 593 594 595 596 597 598 599 600 601 602
## [603] 603 604 605 606 607 608 609 610 611 612 613 614 615 616
## [617] 617 618 619 620 621 622 623 624 625 626 627 628 629 630
## [631] 631 632 633 634 635 636 637 638 639 640 641 642 643 644
## [645] 645 646 647 648 649 650 651 652 653 654 655 656 657 658
## [659] 659 660 661 662 663 664 665 666 667 668 669 670 671 672
## [673] 673 674 675 676 677 678 679 680 681 682 683 684 685 686
## [687] 687 688 689 690 691 692 693 694 695 696 697 698 699 700
## [701] 701 702 703 704 705 706 707 708 709 710 711 712 713 714
## [715] 715 716 717 718 719 720 721 722 723 724 725 726 727 728
## [729] 729 730 731 732 733 734 735 736 737 738 739 740 741 742
## [743] 743 744 745 746 747 748 749 750 751 752 753 754 755 756
## [757] 757 758 759 760 761 762 763 764 765 766 767 768 769 770
## [771] 771 772 773 774 775 776 777 778 779 780 781 782 783 784
## [785] 785 786 787 788 789 790 791 792 793 794 795 796 797 798
## [799] 799 800 801 802 803 804 805 806 807 808 809 810 811 812
## [813] 813 814 815 816 817 818 819 820 821 822 823 824 825 826
## [827] 827 828 829 830 831 832 833 834 835 836 837 838 839 840
## [841] 841 842 843 844 845 846 847 848 849 850 851 852 853 854
## [855] 855 856 857 858 859 860 861 862 863 864 865 866 867 868
## [869] 869 870 871 872 873 874 875 876 877 878 879 880 881 882
## [883] 883 884 885 886 887 888 889 890 891 892 893 894 895 896
## [897] 897 898 899 900 901 902 903 904 905 906 907 908 909 910
## [911] 911 912 913 914 915 916 917 918 919 920 921 922 923 924
## [925] 925 926 927 928 929 930 931 932 933 934 935 936 937 938
## [939] 939 940 941 942 943 944 945 946 947 948 949 950 951 952
## [953] 953 954 955 956 957 958 959 960 961 962 963 964 965 966
## [967] 967 968 969 970 971 972 973 974 975 976 977 978 979 980
## [981] 981 982 983 984 985 986 987 988 989 990 991 992 993 994
## [995] 995 996 997 998 999 1000
##
## $roots
## [1] 1.000000 1.414214 1.732051 2.000000 2.236068 2.449490 2.645751
## [8] 2.828427 3.000000 3.162278 3.316625 3.464102 3.605551 3.741657
## [15] 3.872983 4.000000 4.123106 4.242641 4.358899 4.472136 4.582576
## [22] 4.690416 4.795832 4.898979 5.000000 5.099020 5.196152 5.291503
## [29] 5.385165 5.477226 5.567764 5.656854 5.744563 5.830952 5.916080
## [36] 6.000000 6.082763 6.164414 6.244998 6.324555 6.403124 6.480741
## [43] 6.557439 6.633250 6.708204 6.782330 6.855655 6.928203 7.000000
## [50] 7.071068 7.141428 7.211103 7.280110 7.348469 7.416198 7.483315
## [57] 7.549834 7.615773 7.681146 7.745967 7.810250 7.874008 7.937254
## [64] 8.000000 8.062258 8.124038 8.185353 8.246211 8.306624 8.366600
## [71] 8.426150 8.485281 8.544004 8.602325 8.660254 8.717798 8.774964
## [78] 8.831761 8.888194 8.944272 9.000000 9.055385 9.110434 9.165151
## [85] 9.219544 9.273618 9.327379 9.380832 9.433981 9.486833 9.539392
## [92] 9.591663 9.643651 9.695360 9.746794 9.797959 9.848858 9.899495
## [99] 9.949874 10.000000 10.049876 10.099505 10.148892 10.198039 10.246951
## [106] 10.295630 10.344080 10.392305 10.440307 10.488088 10.535654 10.583005
## [113] 10.630146 10.677078 10.723805 10.770330 10.816654 10.862780 10.908712
## [120] 10.954451 11.000000 11.045361 11.090537 11.135529 11.180340 11.224972
## [127] 11.269428 11.313708 11.357817 11.401754 11.445523 11.489125 11.532563
## [134] 11.575837 11.618950 11.661904 11.704700 11.747340 11.789826 11.832160
## [141] 11.874342 11.916375 11.958261 12.000000 12.041595 12.083046 12.124356
## [148] 12.165525 12.206556 12.247449 12.288206 12.328828 12.369317 12.409674
## [155] 12.449900 12.489996 12.529964 12.569805 12.609520 12.649111 12.688578
## [162] 12.727922 12.767145 12.806248 12.845233 12.884099 12.922848 12.961481
## [169] 13.000000 13.038405 13.076697 13.114877 13.152946 13.190906 13.228757
## [176] 13.266499 13.304135 13.341664 13.379088 13.416408 13.453624 13.490738
## [183] 13.527749 13.564660 13.601471 13.638182 13.674794 13.711309 13.747727
## [190] 13.784049 13.820275 13.856406 13.892444 13.928388 13.964240 14.000000
## [197] 14.035669 14.071247 14.106736 14.142136 14.177447 14.212670 14.247807
## [204] 14.282857 14.317821 14.352700 14.387495 14.422205 14.456832 14.491377
## [211] 14.525839 14.560220 14.594520 14.628739 14.662878 14.696938 14.730920
## [218] 14.764823 14.798649 14.832397 14.866069 14.899664 14.933185 14.966630
## [225] 15.000000 15.033296 15.066519 15.099669 15.132746 15.165751 15.198684
## [232] 15.231546 15.264338 15.297059 15.329710 15.362291 15.394804 15.427249
## [239] 15.459625 15.491933 15.524175 15.556349 15.588457 15.620499 15.652476
## [246] 15.684387 15.716234 15.748016 15.779734 15.811388 15.842980 15.874508
## [253] 15.905974 15.937377 15.968719 16.000000 16.031220 16.062378 16.093477
## [260] 16.124515 16.155494 16.186414 16.217275 16.248077 16.278821 16.309506
## [267] 16.340135 16.370706 16.401219 16.431677 16.462078 16.492423 16.522712
## [274] 16.552945 16.583124 16.613248 16.643317 16.673332 16.703293 16.733201
## [281] 16.763055 16.792856 16.822604 16.852300 16.881943 16.911535 16.941074
## [288] 16.970563 17.000000 17.029386 17.058722 17.088007 17.117243 17.146428
## [295] 17.175564 17.204651 17.233688 17.262677 17.291616 17.320508 17.349352
## [302] 17.378147 17.406895 17.435596 17.464249 17.492856 17.521415 17.549929
## [309] 17.578396 17.606817 17.635192 17.663522 17.691806 17.720045 17.748239
## [316] 17.776389 17.804494 17.832555 17.860571 17.888544 17.916473 17.944358
## [323] 17.972201 18.000000 18.027756 18.055470 18.083141 18.110770 18.138357
## [330] 18.165902 18.193405 18.220867 18.248288 18.275667 18.303005 18.330303
## [337] 18.357560 18.384776 18.411953 18.439089 18.466185 18.493242 18.520259
## [344] 18.547237 18.574176 18.601075 18.627936 18.654758 18.681542 18.708287
## [351] 18.734994 18.761663 18.788294 18.814888 18.841444 18.867962 18.894444
## [358] 18.920888 18.947295 18.973666 19.000000 19.026298 19.052559 19.078784
## [365] 19.104973 19.131126 19.157244 19.183326 19.209373 19.235384 19.261360
## [372] 19.287302 19.313208 19.339080 19.364917 19.390719 19.416488 19.442222
## [379] 19.467922 19.493589 19.519221 19.544820 19.570386 19.595918 19.621417
## [386] 19.646883 19.672316 19.697716 19.723083 19.748418 19.773720 19.798990
## [393] 19.824228 19.849433 19.874607 19.899749 19.924859 19.949937 19.974984
## [400] 20.000000 20.024984 20.049938 20.074860 20.099751 20.124612 20.149442
## [407] 20.174241 20.199010 20.223748 20.248457 20.273135 20.297783 20.322401
## [414] 20.346990 20.371549 20.396078 20.420578 20.445048 20.469489 20.493902
## [421] 20.518285 20.542639 20.566964 20.591260 20.615528 20.639767 20.663978
## [428] 20.688161 20.712315 20.736441 20.760539 20.784610 20.808652 20.832667
## [435] 20.856654 20.880613 20.904545 20.928450 20.952327 20.976177 21.000000
## [442] 21.023796 21.047565 21.071308 21.095023 21.118712 21.142375 21.166010
## [449] 21.189620 21.213203 21.236761 21.260292 21.283797 21.307276 21.330729
## [456] 21.354157 21.377558 21.400935 21.424285 21.447611 21.470911 21.494185
## [463] 21.517435 21.540659 21.563859 21.587033 21.610183 21.633308 21.656408
## [470] 21.679483 21.702534 21.725561 21.748563 21.771541 21.794495 21.817424
## [477] 21.840330 21.863211 21.886069 21.908902 21.931712 21.954498 21.977261
## [484] 22.000000 22.022716 22.045408 22.068076 22.090722 22.113344 22.135944
## [491] 22.158520 22.181073 22.203603 22.226111 22.248595 22.271057 22.293497
## [498] 22.315914 22.338308 22.360680 22.383029 22.405357 22.427661 22.449944
## [505] 22.472205 22.494444 22.516660 22.538855 22.561028 22.583180 22.605309
## [512] 22.627417 22.649503 22.671568 22.693611 22.715633 22.737634 22.759613
## [519] 22.781571 22.803509 22.825424 22.847319 22.869193 22.891046 22.912878
## [526] 22.934690 22.956481 22.978251 23.000000 23.021729 23.043437 23.065125
## [533] 23.086793 23.108440 23.130067 23.151674 23.173260 23.194827 23.216374
## [540] 23.237900 23.259407 23.280893 23.302360 23.323808 23.345235 23.366643
## [547] 23.388031 23.409400 23.430749 23.452079 23.473389 23.494680 23.515952
## [554] 23.537205 23.558438 23.579652 23.600847 23.622024 23.643181 23.664319
## [561] 23.685439 23.706539 23.727621 23.748684 23.769729 23.790755 23.811762
## [568] 23.832751 23.853721 23.874673 23.895606 23.916521 23.937418 23.958297
## [575] 23.979158 24.000000 24.020824 24.041631 24.062419 24.083189 24.103942
## [582] 24.124676 24.145393 24.166092 24.186773 24.207437 24.228083 24.248711
## [589] 24.269322 24.289916 24.310492 24.331050 24.351591 24.372115 24.392622
## [596] 24.413111 24.433583 24.454039 24.474477 24.494897 24.515301 24.535688
## [603] 24.556058 24.576411 24.596748 24.617067 24.637370 24.657656 24.677925
## [610] 24.698178 24.718414 24.738634 24.758837 24.779023 24.799194 24.819347
## [617] 24.839485 24.859606 24.879711 24.899799 24.919872 24.939928 24.959968
## [624] 24.979992 25.000000 25.019992 25.039968 25.059928 25.079872 25.099801
## [631] 25.119713 25.139610 25.159491 25.179357 25.199206 25.219040 25.238859
## [638] 25.258662 25.278449 25.298221 25.317978 25.337719 25.357445 25.377155
## [645] 25.396850 25.416530 25.436195 25.455844 25.475478 25.495098 25.514702
## [652] 25.534291 25.553865 25.573424 25.592968 25.612497 25.632011 25.651511
## [659] 25.670995 25.690465 25.709920 25.729361 25.748786 25.768197 25.787594
## [666] 25.806976 25.826343 25.845696 25.865034 25.884358 25.903668 25.922963
## [673] 25.942244 25.961510 25.980762 26.000000 26.019224 26.038433 26.057628
## [680] 26.076810 26.095977 26.115130 26.134269 26.153394 26.172505 26.191602
## [687] 26.210685 26.229754 26.248809 26.267851 26.286879 26.305893 26.324893
## [694] 26.343880 26.362853 26.381812 26.400758 26.419690 26.438608 26.457513
## [701] 26.476405 26.495283 26.514147 26.532998 26.551836 26.570661 26.589472
## [708] 26.608269 26.627054 26.645825 26.664583 26.683328 26.702060 26.720778
## [715] 26.739484 26.758176 26.776856 26.795522 26.814175 26.832816 26.851443
## [722] 26.870058 26.888659 26.907248 26.925824 26.944387 26.962938 26.981475
## [729] 27.000000 27.018512 27.037012 27.055499 27.073973 27.092434 27.110883
## [736] 27.129320 27.147744 27.166155 27.184554 27.202941 27.221315 27.239677
## [743] 27.258026 27.276363 27.294688 27.313001 27.331301 27.349589 27.367864
## [750] 27.386128 27.404379 27.422618 27.440845 27.459060 27.477263 27.495454
## [757] 27.513633 27.531800 27.549955 27.568098 27.586228 27.604347 27.622455
## [764] 27.640550 27.658633 27.676705 27.694765 27.712813 27.730849 27.748874
## [771] 27.766887 27.784888 27.802878 27.820855 27.838822 27.856777 27.874720
## [778] 27.892651 27.910571 27.928480 27.946377 27.964263 27.982137 28.000000
## [785] 28.017851 28.035692 28.053520 28.071338 28.089144 28.106939 28.124722
## [792] 28.142495 28.160256 28.178006 28.195744 28.213472 28.231188 28.248894
## [799] 28.266588 28.284271 28.301943 28.319605 28.337255 28.354894 28.372522
## [806] 28.390139 28.407745 28.425341 28.442925 28.460499 28.478062 28.495614
## [813] 28.513155 28.530685 28.548205 28.565714 28.583212 28.600699 28.618176
## [820] 28.635642 28.653098 28.670542 28.687977 28.705400 28.722813 28.740216
## [827] 28.757608 28.774989 28.792360 28.809721 28.827071 28.844410 28.861739
## [834] 28.879058 28.896367 28.913665 28.930952 28.948230 28.965497 28.982753
## [841] 29.000000 29.017236 29.034462 29.051678 29.068884 29.086079 29.103264
## [848] 29.120440 29.137605 29.154759 29.171904 29.189039 29.206164 29.223278
## [855] 29.240383 29.257478 29.274562 29.291637 29.308702 29.325757 29.342802
## [862] 29.359837 29.376862 29.393877 29.410882 29.427878 29.444864 29.461840
## [869] 29.478806 29.495762 29.512709 29.529646 29.546573 29.563491 29.580399
## [876] 29.597297 29.614186 29.631065 29.647934 29.664794 29.681644 29.698485
## [883] 29.715316 29.732137 29.748950 29.765752 29.782545 29.799329 29.816103
## [890] 29.832868 29.849623 29.866369 29.883106 29.899833 29.916551 29.933259
## [897] 29.949958 29.966648 29.983329 30.000000 30.016662 30.033315 30.049958
## [904] 30.066593 30.083218 30.099834 30.116441 30.133038 30.149627 30.166206
## [911] 30.182777 30.199338 30.215890 30.232433 30.248967 30.265492 30.282008
## [918] 30.298515 30.315013 30.331502 30.347982 30.364453 30.380915 30.397368
## [925] 30.413813 30.430248 30.446675 30.463092 30.479501 30.495901 30.512293
## [932] 30.528675 30.545049 30.561414 30.577770 30.594117 30.610456 30.626786
## [939] 30.643107 30.659419 30.675723 30.692019 30.708305 30.724583 30.740852
## [946] 30.757113 30.773365 30.789609 30.805844 30.822070 30.838288 30.854497
## [953] 30.870698 30.886890 30.903074 30.919250 30.935417 30.951575 30.967725
## [960] 30.983867 31.000000 31.016125 31.032241 31.048349 31.064449 31.080541
## [967] 31.096624 31.112698 31.128765 31.144823 31.160873 31.176915 31.192948
## [974] 31.208973 31.224990 31.240999 31.256999 31.272992 31.288976 31.304952
## [981] 31.320920 31.336879 31.352831 31.368774 31.384710 31.400637 31.416556
## [988] 31.432467 31.448370 31.464265 31.480152 31.496031 31.511903 31.527766
## [995] 31.543621 31.559468 31.575307 31.591138 31.606961 31.622777
##
## $myMatrix
## [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
## [1,] 1 101 201 301 401 501 601 701 801 901
## [2,] 2 102 202 302 402 502 602 702 802 902
## [3,] 3 103 203 303 403 503 603 703 803 903
## [4,] 4 104 204 304 404 504 604 704 804 904
## [5,] 5 105 205 305 405 505 605 705 805 905
## [6,] 6 106 206 306 406 506 606 706 806 906
## [7,] 7 107 207 307 407 507 607 707 807 907
## [8,] 8 108 208 308 408 508 608 708 808 908
## [9,] 9 109 209 309 409 509 609 709 809 909
## [10,] 10 110 210 310 410 510 610 710 810 910
## [11,] 11 111 211 311 411 511 611 711 811 911
## [12,] 12 112 212 312 412 512 612 712 812 912
## [13,] 13 113 213 313 413 513 613 713 813 913
## [14,] 14 114 214 314 414 514 614 714 814 914
## [15,] 15 115 215 315 415 515 615 715 815 915
## [16,] 16 116 216 316 416 516 616 716 816 916
## [17,] 17 117 217 317 417 517 617 717 817 917
## [18,] 18 118 218 318 418 518 618 718 818 918
## [19,] 19 119 219 319 419 519 619 719 819 919
## [20,] 20 120 220 320 420 520 620 720 820 920
## [21,] 21 121 221 321 421 521 621 721 821 921
## [22,] 22 122 222 322 422 522 622 722 822 922
## [23,] 23 123 223 323 423 523 623 723 823 923
## [24,] 24 124 224 324 424 524 624 724 824 924
## [25,] 25 125 225 325 425 525 625 725 825 925
## [26,] 26 126 226 326 426 526 626 726 826 926
## [27,] 27 127 227 327 427 527 627 727 827 927
## [28,] 28 128 228 328 428 528 628 728 828 928
## [29,] 29 129 229 329 429 529 629 729 829 929
## [30,] 30 130 230 330 430 530 630 730 830 930
## [31,] 31 131 231 331 431 531 631 731 831 931
## [32,] 32 132 232 332 432 532 632 732 832 932
## [33,] 33 133 233 333 433 533 633 733 833 933
## [34,] 34 134 234 334 434 534 634 734 834 934
## [35,] 35 135 235 335 435 535 635 735 835 935
## [36,] 36 136 236 336 436 536 636 736 836 936
## [37,] 37 137 237 337 437 537 637 737 837 937
## [38,] 38 138 238 338 438 538 638 738 838 938
## [39,] 39 139 239 339 439 539 639 739 839 939
## [40,] 40 140 240 340 440 540 640 740 840 940
## [41,] 41 141 241 341 441 541 641 741 841 941
## [42,] 42 142 242 342 442 542 642 742 842 942
## [43,] 43 143 243 343 443 543 643 743 843 943
## [44,] 44 144 244 344 444 544 644 744 844 944
## [45,] 45 145 245 345 445 545 645 745 845 945
## [46,] 46 146 246 346 446 546 646 746 846 946
## [47,] 47 147 247 347 447 547 647 747 847 947
## [48,] 48 148 248 348 448 548 648 748 848 948
## [49,] 49 149 249 349 449 549 649 749 849 949
## [50,] 50 150 250 350 450 550 650 750 850 950
## [51,] 51 151 251 351 451 551 651 751 851 951
## [52,] 52 152 252 352 452 552 652 752 852 952
## [53,] 53 153 253 353 453 553 653 753 853 953
## [54,] 54 154 254 354 454 554 654 754 854 954
## [55,] 55 155 255 355 455 555 655 755 855 955
## [56,] 56 156 256 356 456 556 656 756 856 956
## [57,] 57 157 257 357 457 557 657 757 857 957
## [58,] 58 158 258 358 458 558 658 758 858 958
## [59,] 59 159 259 359 459 559 659 759 859 959
## [60,] 60 160 260 360 460 560 660 760 860 960
## [61,] 61 161 261 361 461 561 661 761 861 961
## [62,] 62 162 262 362 462 562 662 762 862 962
## [63,] 63 163 263 363 463 563 663 763 863 963
## [64,] 64 164 264 364 464 564 664 764 864 964
## [65,] 65 165 265 365 465 565 665 765 865 965
## [66,] 66 166 266 366 466 566 666 766 866 966
## [67,] 67 167 267 367 467 567 667 767 867 967
## [68,] 68 168 268 368 468 568 668 768 868 968
## [69,] 69 169 269 369 469 569 669 769 869 969
## [70,] 70 170 270 370 470 570 670 770 870 970
## [71,] 71 171 271 371 471 571 671 771 871 971
## [72,] 72 172 272 372 472 572 672 772 872 972
## [73,] 73 173 273 373 473 573 673 773 873 973
## [74,] 74 174 274 374 474 574 674 774 874 974
## [75,] 75 175 275 375 475 575 675 775 875 975
## [76,] 76 176 276 376 476 576 676 776 876 976
## [77,] 77 177 277 377 477 577 677 777 877 977
## [78,] 78 178 278 378 478 578 678 778 878 978
## [79,] 79 179 279 379 479 579 679 779 879 979
## [80,] 80 180 280 380 480 580 680 780 880 980
## [81,] 81 181 281 381 481 581 681 781 881 981
## [82,] 82 182 282 382 482 582 682 782 882 982
## [83,] 83 183 283 383 483 583 683 783 883 983
## [84,] 84 184 284 384 484 584 684 784 884 984
## [85,] 85 185 285 385 485 585 685 785 885 985
## [86,] 86 186 286 386 486 586 686 786 886 986
## [87,] 87 187 287 387 487 587 687 787 887 987
## [88,] 88 188 288 388 488 588 688 788 888 988
## [89,] 89 189 289 389 489 589 689 789 889 989
## [90,] 90 190 290 390 490 590 690 790 890 990
## [91,] 91 191 291 391 491 591 691 791 891 991
## [92,] 92 192 292 392 492 592 692 792 892 992
## [93,] 93 193 293 393 493 593 693 793 893 993
## [94,] 94 194 294 394 494 594 694 794 894 994
## [95,] 95 195 295 395 495 595 695 795 895 995
## [96,] 96 196 296 396 496 596 696 796 896 996
## [97,] 97 197 297 397 497 597 697 797 897 997
## [98,] 98 198 298 398 498 598 698 798 898 998
## [99,] 99 199 299 399 499 599 699 799 899 999
## [100,] 100 200 300 400 500 600 700 800 900 1000
print(class_coursework)
## $numbers
## [1] "integer"
##
## $roots
## [1] "numeric"
##
## $myMatrix
## [1] "matrix" "array"
print(sum_roots)
## [1] 21097.46