100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Resumen

Summary Introduction to Programming Course Commands Guide

Puntuación
-
Vendido
-
Páginas
9
Subido en
09-05-2023
Escrito en
2022/2023

This document contains a guide on the R studio commands and what the command is used for to create and work with mathematical operations, readline variables, character variables, conditional statements, loops, functions, arrays and vectors, data frames, merges, and all of the dplyr commands.

Mostrar más Leer menos
Institución
IE University
Grado
411933









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Información del documento

Subido en
9 de mayo de 2023
Número de páginas
9
Escrito en
2022/2023
Tipo
Resumen

Temas

Vista previa del contenido

● cat(“ “) → display a sentence on the screen
Cat without quotation is used to display variables. Ex. a=3, cat(a), 3 is displayed


● typeof → show what kind of variable it is


OPERATIONS FOR NUMERIC VARIABLES


● + → addition
● - → subtraction
● * → multiplication
● %/% → floor division: without decimals (rounded)
● %%==0 → modulus: check if remainder of a division is 0
● %%# → modulus: divide numbers by # and extract the remainder of the division


READLINE


● readline(”TEXT”) → Ask for information from the user of the script. Always
character variable


To convert readline variables into other variables:
● variable = as.numeric(variable)
● variable = as.integer(variable)
● variable = as.character(variable)
● variable = as.logic = (variable)


COMMANDS FOR CHARACTER VARIABLES


● nchar(text_variable) → number of characters in text_variable


● toupper(text_variable) → put in uppercase


● tolower(text_variable) → put in lowercase

, ● gsub(“st”,”street”, text) → change “st” for “street” in text


● trimws(text_variable) → delete unnecessary spaces


● gsub(“ “,””,name of variable) → to delete all spaces in a variable


● grepl(“word”, text_variable) → check if a word is in the variable
Transform word to lower case first


● substr(text_variable, number, number) → Show the characters in position of first
number until the second number


● paste0(variable 1, variable 2) → paste two variables together


CONDITIONAL STATEMENTS


If (condition a) {


if it is false, then…

}else if (condition b)
….


}else{
}
Final else is optional and always without condition


For conditions:
● a > b → greater than
● a < b → less than
● a == b → equal to
● a & b → a and b
● a|b → a or b


LOOPS
16,49 €
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
dannaadelapaz03

Conoce al vendedor

Seller avatar
dannaadelapaz03 IE University
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
0
Miembro desde
2 año
Número de seguidores
0
Documentos
2
Última venta
-

0,0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes