This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.
When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
You can also embed plots, for example:
BDN <- NULL ## ES UN BECTOR
BDC <- NULL ## ES OTRO BECTOR
columnas <-dim(BD)[2] ## Contador de las columnas de la tabla BD
par(mfrow = c (2,columnas/2))## esta accion esta generando los graficos en filas y columnas
for (i in 1:columnas) {
if (is.numeric(BD[ ,i])==TRUE) {
# --- SI LA COLUMNA ES NUMÉRICA ---
Texto = paste("Analisis del Atributo",colnames(BD)[i])
hist(BD[,i], main = Texto, col=i)# Crea un HISTOGRAMA
BDN <- c (BDN, i) # Guarda la posición 'i' en BDN
} else {
# --- SI LA COLUMNA NO ES NUMÉRICA (TEXTO/FACTOR) ---
Texto = paste("analisis del atributo",colnames(BD)[i])
pie(table(BD [ ,i]), main = Texto) # Crea un GRÁFICO DE PASTELES (PIE)
BDC <-c (BDC, i)# Guarda la posición 'i' en BDC
}
}
Note that the echo = FALSE parameter was added to the
code chunk to prevent printing of the R code that generated the
plot.