This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Tipo =FILE= */ | |
/* En C se emplea la estructura de datos de tipo =FILE= (declarada en =stdio.h=): */ | |
#include <stdio.h> | |
void main () | |
{ | |
FILE *pf; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Dirección de memoria de una variable */ | |
/* - Ejemplo: un dato =int= ocupa 4 bytes. */ | |
int main() { | |
int x; | |
return 0; | |
} | |
/* Operador & */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(raster) | |
library(rgdal) | |
library(rasterVis) | |
library(graticule) | |
## Only needed for downloading a raster example | |
library(meteoForecast) | |
today <- Sys.Date() | |
testDay <- today - 7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Código */ | |
int main() { | |
tipo identificador[dimensión]; | |
return 0; | |
} | |
/* Ejemplos */ | |
int main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Prototipo de una función: */ | |
/* 1. Tipo de valor que devuelve (=int=, =void=, ...) */ | |
/* 2. Nombre de la función (debe ser un identificador válido y *útil*). */ | |
/* 3. Lista de argumentos que emplea, por tipo y nombre (puede estar vacía). */ | |
int main() { | |
tipo nombre_funcion(tipo1 arg1, tipo2 arg2, ...); | |
return 0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Ejemplo =if= */ | |
# include <stdio.h> | |
int main () | |
{ | |
int n; | |
printf("Escribe un número entero\n"); | |
scanf("%d", &n); | |
if (n % 2 == 0) // Condición |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Hello World! */ | |
#include <stdio.h> | |
void main() | |
{ | |
printf("Hello World!\n"); | |
} | |
/* Hello World! (2) */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## https://timogrossenbacher.ch/2016/12/beautiful-thematic-maps-with-ggplot2-only/ | |
library(raster) | |
library(sp) | |
library(rgdal) | |
library(viridisLite) | |
library(rasterVis) | |
## Read age data | |
data <- read.csv("input/avg_age_15.csv", stringsAsFactors = F) | |
## Read shapefile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(raster) | |
library(rasterVis) | |
library(grid) | |
r <- raster(system.file("external/test.grd", package="raster")) | |
## Main graphic | |
p1 <- levelplot(r) | |
## Inset graphic | |
p2 <- levelplot(r, | |
margin = FALSE, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(sp) | |
library(raster) | |
library(rgdal) | |
library(maptools) | |
library(gstat) | |
library(lattice) | |
library(latticeExtra) | |
library(rasterVis) | |
library(parallel) | |
library(solaR) |
NewerOlder