<jupyter_start><jupyter_text>Datasets<jupyter_code>df <- read.csv('desemprego.csv')
str(df)
summary(df)
head(df)
tail(df)<jupyter_output><empty_output><jupyter_text>Datasets não convencionais<jupyter_code>df2 <- read.csv('dataset-nao-convencional.csv',dec = ',', sep = ";")
str(df2)
head(df2)
df3 <- read.csv('dataset-nao-convencional.csv',dec = ',', sep = ";", 
      colClasses= c('character','integer','numeric'))
str(df3)
df4 <- read.csv('datas.csv',colClasses=c('Date','integer', 'numeric'))
print(as.numeric(format(df4$Nascimento, "%m")))
df6 <- read.csv('datas-horas.csv', colClasses = c('character', 'numeric', 'numeric'))
str(df6)
df6$Nascimento <- strptime(df6$Nascimento,format='%d-%m-%Y %H:%M:%S')
str(df6)
valores <- c(1.0,5.2,,6.7,3.2,4.1)
valores <- c(1.0,5.2,NA,6.7,3.2,4.1)
valores
valores <- c(1.0,5.2,NaN,6.7,3.2,4.1)
valores
mean(valores)
valores <- c(1.0,5.2,NULL,6.7,3.2,4.1)
valores
mean(valores)
length(valores)
valores <- c(1.0,5.2,NA,6.7,3.2,4.1)
is.na(valores)
is.na(valores[3])
valores <- c(1.0,5.2,NaN,6.7,3.2,4.1)
is.na(valores)
# Inf é numérico! 

valores <- c(1.0,5.2,Inf,6.7,3.2,4.1)
is.na(valores)
is.infinite(valores)
valores <- c(1.0,5.2,NULL,6.7,3.2,4.1)
is.na(valores)
library(tidyr)
library(dplyr)<jupyter_output>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
{'fraction_non_alphanumeric': 0.22529371112646857, 'fraction_numerical': 0.06427090532135453, 'mean_word_length': 5.830188679245283, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '529946', 'license': 'Apache-2.0', 'n_tokens_mistral': 701, 'n_tokens_neox': 679, 'n_words': 89, 'path': 'book-R/datasets.ipynb', 'repo_name': 'rlo1977/datascience', 'size': '1447'}