Programming > CODING SOLUTION > Coding > R Basics hands on The American School of Dubai DATABASE BASIC (All)

Coding > R Basics hands on The American School of Dubai DATABASE BASIC

Document Content and Description Below

#Write your code here type conversation K<-2 if (class(K)!="integer") { K <- as.integer(K) print(K) } R Basics - Variables #Write your code here L<-as.Date('2018-01-01') get_next_leap_year <... - function(L) { all_years <- L + 1:4 all_years[(all_years %% 4 == 0 & all_years %%100 != 0) | all_years %% 400 == 0] } LN <-get_next_leap_year(2018) print(LN) Conditional Operations - if/else #Write your code here Marks <- c(78,85,90) for (value in Marks) { if(value>=80){print("Above Average")}else{print("Average")} } Conditional Operations - which() #Write your code here M<-10:20 print(M) which(M>13 & M<16) Random Numbers in R #Write your code here V<-round(runif(10,0,1), 2) print(V ) ifelse(V<0.50,"Less","More") Factors and Levels #Write your code here a<-factor(c("yes","no","yes","maybe")) print(levels(a)) Vector Operations #Write your code here X<-1:5 Y<-seq(2,10,2) [Show More]

Last updated: 2 years ago

Preview 1 out of 4 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$4.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

141
0

Document information


Connected school, study & course


About the document


Uploaded On

Jan 15, 2023

Number of pages

4

Written in

Seller


seller-icon
PAPERS UNLIMITED™

Member since 3 years

509 Documents Sold

Reviews Received
55
20
8
2
8
Additional information

This document has been written for:

Uploaded

Jan 15, 2023

Downloads

 0

Views

 141

Document Keyword Tags

More From PAPERS UNLIMITED™

View all PAPERS UNLIMITED™'s documents »

$4.00
What is Scholarfriends

In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·