View q103_tema7.c
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; | |
} |
View q103_tema5.c
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 & */ |
View graticule.R
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 |
View q103_tema4.c
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() { |
View q103_tema6.c
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; | |
} |
View q103_tema3.c
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 |
View q103_tema2.c
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) */ |
View code_without_ggplot2.R
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 |
View inset.R
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, |
View horizon_4Oscar.R
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