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
# Timing measurement in R. Vectorized operation on matrix / data.frame | |
# Author: José María Mateos - jmmateos@ieee.org | |
# | |
# For certain vectorized operations, it makes sense to convert your data.frame | |
# into a matrix. Even if you are using apply, the data frame iteration can be | |
# real slow. | |
# | |
# In this example, I will compute the Euclidean distance for a random vector | |
# and a random matrix / data.frame of thousands of elements. Operations will be | |
# done in two different ways: using the apply function over the columns and |
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
open("C:\\temp\\barcenas.tif"); | |
run("32-bit"); | |
run("Mean...", "radius=30"); | |
open("C:\\temp\\mariano.tif"); | |
run("32-bit"); | |
run("Duplicate...", "title=mariano-1.tif"); | |
run("Mean...", "radius=20"); | |
imageCalculator("Subtract create 32-bit", "mariano.tif","mariano-1.tif"); | |
imageCalculator("Add create 32-bit", "Result of mariano.tif","barcenas.tif"); | |
selectWindow("barcenas.tif"); |
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
# Eustat data analysis | |
library(ggplot2) | |
eustat <- read.csv(file = "/tmp/ilc_di01_1_Data.csv", na.string = ":") | |
eustat$Value <- gsub(" ", "", eustat$Value) | |
eustat$Value <- as.numeric(eustat$Value) | |
spain <- eustat[eustat$GEO == "Spain" & | |
eustat$CURRENCY == "Purchasing Power Standard" & | |
eustat$INDIC_IL == "Top cut-off point", |
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
station | Leq | L1 | L10 | L50 | L90 | L99 | date | ||
---|---|---|---|---|---|---|---|---|---|
14 | GLORIETA FDEZ. LADREDA | 67.3 | 75.3 | 69.8 | 64.3 | 56.7 | 50 | 1998-09-30 | |
16 | ARTURO SORIA | 59.5 | 67.8 | 61.6 | 56 | 45.3 | 39.1 | 1998-09-30 | |
19 | ALTO DE EXTREMADURA | 63 | 72.4 | 66.3 | 59.3 | 51.4 | 47 | 1998-09-30 | |
27 | GLORIETA CARLOS V | 74.3 | 84.4 | 79.5 | 67.8 | 62 | 55.5 | 1998-10-31 | |
29 | PLAZA DE ESPAÑA | 66.3 | 74 | 68.8 | 64.5 | 59.6 | 54.8 | 1998-10-31 | |
31 | PLAZA DOCTOR MARAÑÓN | 72.5 | 80.2 | 75.6 | 70.2 | 63.1 | 55.2 | 1998-10-31 | |
32 | PLAZA M. DE SALAMANCA | 73.1 | 88.4 | 69.9 | 63.6 | 51.8 | 42.1 | 1998-10-31 | |
36 | RAMÓN Y CAJAL | 70.3 | 77.2 | 72.9 | 68.8 | 56.8 | 46.3 | 1998-10-31 | |
39 | GLORIETA FDEZ. LADREDA | 68 | 75.8 | 70.2 | 64.6 | 56.8 | 49.8 | 1998-10-31 |
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
package jclustering; | |
import ij.ImagePlus; | |
/** | |
* This class extends {@link ImagePlus} in order to add a handy {@link #getTac} | |
* method that allows to easily grab time-activity curves. | |
* | |
* @author <a href="mailto:jmmateos@mce.hggm.es">José María Mateos</a>. | |
* |
NewerOlder