Sandbox: Difference between revisions
Juha Villman (talk | contribs) No edit summary |
|||
(20 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<math> | |||
\alpha + 444444 + \beta + \omega | |||
</math> | |||
jepjepjepjep | |||
[[:File:aditro.PNG]] | |||
[[Image:kuvatiedostonmitähäan.jpg]] | |||
<display_map type="terrain"> | |||
62.904602, 27.647781 | |||
62.891918, 27.680013 | |||
</display_map> | |||
{{mfiles}} | |||
<t2b index="Make" unit="kg" desc="Description"> | |||
Lata|100| | |||
Toyota|88|Toijota | |||
</t2b> | |||
{{variable|moderator=Ehac}} | |||
mitä tapahtuu! | |||
<math>\alpha + 8884444</math> | <math>\alpha + 8884444</math> | ||
Line 23: | Line 36: | ||
</math> | </math> | ||
== Live Code Test == | |||
<rcode live=1 graphics=1 name='live_test' variables='name:breaks|description:Breaks|options:10;10;20;20;35;35;50;50|type:selection|default:10'> | |||
hist(faithful$eruptions, | |||
probability = TRUE, | |||
breaks = as.numeric(breaks), | |||
xlab = "Duration (minutes)", | |||
main = "Geyser eruption duration") | |||
</rcode> | |||
== Sotkanet == | |||
<rcode name='sotkanet_test'> | |||
library(OpasnetUtils) | |||
library(OpasnetUtilsExt) | |||
# collect makes a data.frame out of the list object from Sotkanet | |||
# x is the input data | |||
# name is the name for the column | |||
# single is a logical whether there is only a single entry in the x data. | |||
collect <- function(x, name, single = FALSE) { | |||
out <- data.frame() | |||
if(single) {out <- data.frame(temp1 = x$id, temp2 = x$title$fi) | |||
} else { | |||
for(i in 1:length(x)) { | |||
out <- rbind(out, data.frame(temp1 = x[[i]]$id, temp2 = x[[i]]$title$fi)) | |||
} | |||
} | |||
colnames(out) <- c(name, paste(name, "Result", sep="")) | |||
return(out) | |||
} | |||
a <- sotkanet.indicators() | |||
# print(a) | |||
b <- sotkanet.indicators(127) | |||
b <- collect(b, "indicator", TRUE) | |||
# print(xtable(b), type = 'html') | |||
d <- sotkanet.regions() | |||
d <- collect(d, "region") | |||
# print(xtable(d), type = 'html') | |||
e <- sotkanet.data(indicator=127,years=c(2011,2010),genders='female') | |||
e <- merge(b, e) | |||
e <- merge(d, e) | |||
oprint(e) | |||
</rcode> | |||
== Objects save test == | == Objects save test == | ||
Line 39: | Line 109: | ||
<rcode embed="1" variables="name:test|type:table"> | <rcode embed="1" variables="name:test|type:table"> | ||
library( | library(OpasnetUtils) | ||
oprint(test) | |||
</rcode> | </rcode> | ||
Line 47: | Line 117: | ||
<rcode> | <rcode> | ||
library(OpasnetUtils) | library(OpasnetUtils) | ||
merge( | aa <- new("ovariable", output = data.frame(dummy=NA)) | ||
bb <- new("ovariable", output = data.frame(a=1:4)) | |||
#cc <- new("ovariable", output = data.frame(a=1:4)) | |||
cc <- '' | |||
test <- Ovariable( | |||
name='test', | |||
dependencies = data.frame( | |||
Name = c("aa", "bb", "cc"), | |||
Ident = c(NA, NA, NA) | |||
), | |||
formula = function(dependencies, ...) { | |||
ComputeDependencies(dependencies, ...) | |||
out <- merge(aa, bb) | |||
return(out) | |||
} | |||
) | |||
oprint(test) | |||
</rcode> | </rcode> | ||
Line 62: | Line 152: | ||
library(RColorBrewer) | library(RColorBrewer) | ||
library(classInt) | library(classInt) | ||
library( | library(OpasnetUtils) | ||
library(OpasnetUtilsExt) | |||
shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','kuopio_house') | shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','kuopio_house') | ||
Line 131: | Line 222: | ||
legend("topleft", legend=names(attr(colcode, "table")),title="Ika", fill=attr(colcode, "palette"), cex=1.0, bty="y",bg="white") | legend("topleft", legend=names(attr(colcode, "table")),title="Ika", fill=attr(colcode, "palette"), cex=1.0, bty="y",bg="white") | ||
</rcode> | </rcode> | ||
== Kuopio buildings on Google maps test == | == Kuopio buildings on Google maps test == | ||
Line 142: | Line 231: | ||
library(RColorBrewer) | library(RColorBrewer) | ||
library(classInt) | library(classInt) | ||
library( | library(OpasnetUtils) | ||
library(OpasnetUtilsExt) | |||
library(RODBC) | library(RODBC) | ||
Line 219: | Line 309: | ||
</rcode> | </rcode> | ||
== GoogleMaps Sorvi MML TEST == | |||
<rcode name='gmapspsqltest3'> | <rcode name='gmapspsqltest3'> | ||
library( | library(OpasnetUtils) | ||
library(OpasnetUtilsExt) | |||
library(sorvi) | library(sorvi) | ||
library(rgdal) | library(rgdal) | ||
Line 251: | Line 341: | ||
</rcode> | </rcode> | ||
== GoogleMaps PostgreSQL test 2 == | |||
<rcode name='gmapspsqltest2'> | <rcode name='gmapspsqltest2'> | ||
Line 259: | Line 349: | ||
library(RColorBrewer) | library(RColorBrewer) | ||
library(classInt) | library(classInt) | ||
library( | library(OpasnetUtils) | ||
library(OpasnetUtilsExt) | |||
shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','watson_wkt') | shp<-readOGR('PG:host=localhost user=postgres dbname=spatial_db','watson_wkt') | ||
Line 286: | Line 377: | ||
</rcode> | </rcode> | ||
== GoogleMaps PostgreSQL test == | |||
<rcode name='gmapspsqltest'> | <rcode name='gmapspsqltest'> | ||
library( | library(OpasnetUtils) | ||
cat(" | library(OpasnetUtilsExt) | ||
cat("PostgreSQL Test\n") | |||
google.show_data_on_maps() | google.show_data_on_maps() | ||
Line 298: | Line 390: | ||
</rcode> | </rcode> | ||
== Opasnet.csv test == | |||
<rcode name='opcsvtest'> | <rcode name='opcsvtest'> | ||
library( | library(OpasnetUtils) | ||
csv <- opasnet.csv("2/25/Russian_elections_2011_results.csv") | csv <- opasnet.csv("2/25/Russian_elections_2011_results.csv") | ||
Line 309: | Line 401: | ||
</rcode> | </rcode> | ||
== Opasnet.data and BUGS test == | |||
<rcode name='odabugstest' graphics=1> | <rcode name='odabugstest' graphics=1> | ||
library( | library(OpasnetUtils) | ||
pumps.model <- opasnet.data('c/cc/Test_bugs_model.txt') | pumps.model <- opasnet.data('c/cc/Test_bugs_model.txt') | ||
Line 363: | Line 455: | ||
<br> {{greenbox| | <br> {{greenbox| | ||
==Hello== | |||
* this works | * this works | ||
}} | }} | ||
{{bluebox| | {{bluebox| | ||
==Bluebox== | |||
* works | * works | ||
* ok | * ok | ||
Line 387: | Line 479: | ||
name:divisions2|description:Minkä yhden tekijän halua eritellä kuvaajassa?|type:selection|options:'Katalyytin määrä';Katalyytin määrä;'Ikä';Ikä;'Kastelu';Kastelu;'Käytetty puristin';Käytetty puristin|default:'Kastelu' | name:divisions2|description:Minkä yhden tekijän halua eritellä kuvaajassa?|type:selection|options:'Katalyytin määrä';Katalyytin määrä;'Ikä';Ikä;'Kastelu';Kastelu;'Käytetty puristin';Käytetty puristin|default:'Kastelu' | ||
"> | "> | ||
library( | library(OpasnetUtils) | ||
library(ggplot2) | library(ggplot2) | ||
library(xtable) | library(xtable) |
Latest revision as of 19:33, 17 May 2014
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \alpha + 444444 + \beta + \omega }
jepjepjepjep
File:Kuvatiedostonmitähäan.jpg
<display_map type="terrain"> 62.904602, 27.647781 62.891918, 27.680013 </display_map>
<mfanonymousfilelist></mfanonymousfilelist>
Obs | Make | Result | Description |
---|---|---|---|
1 | Lata | 100 | |
2 | Toyota | 88 | Toijota |
[show] |
---|
mitä tapahtuu!
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \alpha + 8884444}
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \textstyle L_{Aeq} = 10 \log \int_{t_0}^{t_1} \frac{p_A^2(t)}{p_0^2} dt }
Live Code Test
Sotkanet
Objects save test
Giving tables via user interface
ovariable merge testing
Static GoogleMaps test
Kuopio buildings on Google maps test
GoogleMaps Sorvi MML TEST
GoogleMaps PostgreSQL test 2
GoogleMaps PostgreSQL test
Opasnet.csv test
Opasnet.data and BUGS test
Failed to parse (SVG (MathML can be enabled via browser plugin): Invalid response ("Math extension cannot connect to Restbase.") from server "https://wikimedia.org/api/rest_v1/":): {\displaystyle \alpha 444 + 9999 / 123}
Hello
- this works
Bluebox
- works
- ok
R-tools code include example
Rectangle area test
MassHEIS test
- Moved to MassHEIS.
MassHEIS test multilayer NOT WORKING YET