Sandbox: Difference between revisions

From Opasnet
Jump to navigation Jump to search
No edit summary
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{variable|moderator=Ehac}}
<math>
\alpha + 444444 + \beta + \omega
</math>
 
jepjepjepjep
 
 
 
[[:File:aditro.PNG]]
 
[[Image:kuvatiedostonmitähäan.jpg]]


&#9;jepjep
<display_map type="terrain">
62.904602, 27.647781
62.891918, 27.680013
</display_map>


Wikitab
{{mfiles}}


http://ytoswww/yhteiset/YMAL/Projects/  
<t2b index="Make" unit="kg" desc="Description">
Lata|100|
Toyota|88|Toijota
</t2b>


Edited by ehacfff
{{variable|moderator=Ehac}}
math ei jekkase
mitä tapahtuu!
<math>


L_{Aeq} = 10 \log \int_{t_0}^{t_1} \frac{p_A^2(t)}{p_0^2} dt


</math>


<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 ==
<rcode name='objs_save_test'>
library(OpasnetUtils)
x <- stats::runif(20)
y <- list(a = 1, b = TRUE, c = "Jeah baby jeah!")
objects.store(x, y, verbose=TRUE)
</rcode>


==Giving tables via user interface==
==Giving tables via user interface==


<rcode embed="1" variables="name:test|type:text|default:1\t2\t3\n4\t5\t6\n7\t8\t9">
<rcode embed="1" variables="name:test|type:table">
test
library(OpasnetUtils)
test <-  as.data.frame(t(sapply(strsplit(unlist(strsplit(test, "\n")), "\t"), c)))
oprint(test)
test
</rcode>
</rcode>


Line 36: Line 117:
<rcode>
<rcode>
library(OpasnetUtils)
library(OpasnetUtils)
a <- new("ovariable", output = data.frame(dummy=NA))
b <- new("ovariable", output = data.frame(a=1:4))


merge(a,b)
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 51: Line 152:
library(RColorBrewer)
library(RColorBrewer)
library(classInt)
library(classInt)
library(OpasnetBaseUtils)
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 120: 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 131: Line 231:
library(RColorBrewer)
library(RColorBrewer)
library(classInt)
library(classInt)
library(OpasnetBaseUtils)
library(OpasnetUtils)
library(OpasnetUtilsExt)
library(RODBC)
library(RODBC)


Line 208: Line 309:
</rcode>
</rcode>


 
== GoogleMaps Sorvi MML TEST ==
=== GoogleMaps Sorvi MML TEST ===


<rcode name='gmapspsqltest3'>
<rcode name='gmapspsqltest3'>


library(OpasnetBaseUtils)
library(OpasnetUtils)
library(OpasnetUtilsExt)
library(sorvi)
library(sorvi)
library(rgdal)
library(rgdal)
Line 240: Line 341:
</rcode>
</rcode>


=== GoogleMaps PostgreSQL test 2 ===
== GoogleMaps PostgreSQL test 2 ==


<rcode name='gmapspsqltest2'>
<rcode name='gmapspsqltest2'>
Line 248: Line 349:
library(RColorBrewer)
library(RColorBrewer)
library(classInt)
library(classInt)
library(OpasnetBaseUtils)
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 275: Line 377:
</rcode>
</rcode>


=== GoogleMaps PostgreSQL test ===
== GoogleMaps PostgreSQL test ==


<rcode name='gmapspsqltest'>
<rcode name='gmapspsqltest'>
library('OpasnetBaseUtils')
library(OpasnetUtils)
cat("<span style='font-size: 1.2em;font-weight:bold;'>PostgreSQL Test</span>\n")
library(OpasnetUtilsExt)
cat("PostgreSQL Test\n")
google.show_data_on_maps()
google.show_data_on_maps()


Line 287: Line 390:
</rcode>
</rcode>


=== Opasnet.csv test ===
== Opasnet.csv test ==


<rcode name='opcsvtest'>
<rcode name='opcsvtest'>
library(OpasnetBaseUtils)
library(OpasnetUtils)


csv <- opasnet.csv("2/25/Russian_elections_2011_results.csv")
csv <- opasnet.csv("2/25/Russian_elections_2011_results.csv")
Line 298: Line 401:
</rcode>
</rcode>


=== Opasnet.data and BUGS test ===
== Opasnet.data and BUGS test ==


<rcode name='odabugstest' graphics=1>
<rcode name='odabugstest' graphics=1>
library(OpasnetBaseUtils)
library(OpasnetUtils)
pumps.model <- opasnet.data('c/cc/Test_bugs_model.txt')
pumps.model <- opasnet.data('c/cc/Test_bugs_model.txt')


Line 352: Line 455:


<br> {{greenbox|
<br> {{greenbox|
===Hello===
==Hello==
* this works
* this works
}}  
}}  


{{bluebox|
{{bluebox|
===Bluebox===
==Bluebox==
* works
* works
* ok
* ok
Line 376: 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(OpasnetBaseUtils)
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:aditro.PNG

File:Kuvatiedostonmitähäan.jpg

<display_map type="terrain"> 62.904602, 27.647781 62.891918, 27.680013 </display_map>


<mfanonymousfilelist></mfanonymousfilelist>


Sandbox: Difference between revisions(kg)
ObsMakeResultDescription
1Lata100
2Toyota88Toijota



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

Breaks:

+ Show code


Sotkanet

+ Show code

Objects save test

+ Show code

Giving tables via user interface

test:

Cancel

+ Show code

ovariable merge testing

+ Show code

Static GoogleMaps test

+ Show code

Kuopio buildings on Google maps test

Building minimum age:

+ Show code

GoogleMaps Sorvi MML TEST

+ Show code

GoogleMaps PostgreSQL test 2

+ Show code

GoogleMaps PostgreSQL test

+ Show code

Opasnet.csv test

+ Show code

Opasnet.data and BUGS test

+ Show code

+ Show code

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

+ Show code

Jatropan viljelyala (ha):

n:

Mitkä tekijät halua eritellä tuloksessa?:
Katalyytin määrä
Ikä
Kastelu
Käytetty puristin

Minkä yhden tekijän halua eritellä kuvaajassa?:

+ Show code

+ Show code

Rectangle area test

width:

Rect height:

+ Show code

MassHEIS test

Moved to MassHEIS.

MassHEIS test multilayer NOT WORKING YET

+ Show code