Skip to content

Opening book details…

About this document

R User Input and Basic Programming by Priti Patil is a document available to read on EtoBox.

This document contains sample R code questions and outputs. It includes programs to: 1) Take user input of name and age and print values along with R version. 2) Create a sequence from 20 to 50, find mean from 20 to 60 and sum from 51 to 91. 3) Print the first 10 Fibonacci numbers. 4) Print numbers from 1 to 100, replacing multiples of 3 with "Fizz", 5 with "Buzz", and both with "FizzBuzz". 5) Create three vectors with 3 integers each, combine into a 3x3 matrix with columns as vectors, and print.

Author
Priti Patil
Language
EN