| Line 267... |
Line 267... |
| 267 |
|
267 |
|
| 268 |
## How to combine "math" and numeric variables :
|
268 |
## How to combine "math" and numeric variables :
|
| 269 |
plot(1:10, type="n", xlab="", ylab="", main = "plot math & numbers")
|
269 |
plot(1:10, type="n", xlab="", ylab="", main = "plot math & numbers")
|
| 270 |
theta <- 1.23 ; mtext(bquote(hat(theta) == .(theta)), line= .25)
|
270 |
theta <- 1.23 ; mtext(bquote(hat(theta) == .(theta)), line= .25)
|
| 271 |
for(i in 2:9)
|
271 |
for(i in 2:9)
|
| 272 |
text(i,i+1, substitute(list(xi,eta) == group("(",list(x,y),")"),
|
272 |
text(i, i+1, substitute(list(xi, eta) == group("(",list(x,y),")"),
|
| 273 |
list(x=i, y=i+1)))
|
273 |
list(x = i, y = i+1)))
|
| 274 |
## note that both of these use calls rather than expressions.
|
274 |
## note that both of these use calls rather than expressions.
|
| 275 |
##
|
275 |
##
|
| 276 |
text(1,10, "Derivatives:", adj=0)
|
276 |
text(1, 10, "Derivatives:", adj = 0)
|
| 277 |
text(1,9.6, expression(
|
277 |
text(1, 9.6, expression(
|
| 278 |
" first: {f * minute}(x) " == {f * minute}(x)), adj=0)
|
278 |
" first: {f * minute}(x) " == {f * minute}(x)), adj = 0)
|
| 279 |
text(1,9.0, expression(
|
279 |
text(1, 9.0, expression(
|
| 280 |
" second: {f * second}(x) " == {f * second}(x)), adj=0)
|
280 |
" second: {f * second}(x) " == {f * second}(x)), adj = 0)
|
| 281 |
|
281 |
|
| 282 |
|
282 |
|
| 283 |
plot(1:10, 1:10)
|
283 |
plot(1:10, 1:10)
|
| 284 |
text(4, 9, expression(hat(beta) == (X^t * X)^{-1} * X^t * y))
|
284 |
text(4, 9, expression(hat(beta) == (X^t * X)^{-1} * X^t * y))
|
| 285 |
text(4, 8.4, "expression(hat(beta) == (X^t * X)^{-1} * X^t * y)",
|
285 |
text(4, 8.4, "expression(hat(beta) == (X^t * X)^{-1} * X^t * y)",
|
| Line 291... |
Line 291... |
| 291 |
plain(e)^{frac(-(x-mu)^2, 2*sigma^2)})),
|
291 |
plain(e)^{frac(-(x-mu)^2, 2*sigma^2)})),
|
| 292 |
cex = 1.2)
|
292 |
cex = 1.2)
|
| 293 |
|
293 |
|
| 294 |
## some other useful symbols
|
294 |
## some other useful symbols
|
| 295 |
plot.new(); plot.window(c(0,4), c(15,1))
|
295 |
plot.new(); plot.window(c(0,4), c(15,1))
|
| 296 |
text(1, 1, "universal", adj=0); text(2.5, 1, "\\\\042")
|
296 |
text(1, 1, "universal", adj = 0); text(2.5, 1, "\\\\042")
|
| 297 |
text(3, 1, expression(symbol("\\042")))
|
297 |
text(3, 1, expression(symbol("\\042")))
|
| 298 |
text(1, 2, "existential", adj=0); text(2.5, 2, "\\\\044")
|
298 |
text(1, 2, "existential", adj = 0); text(2.5, 2, "\\\\044")
|
| 299 |
text(3, 2, expression(symbol("\\044")))
|
299 |
text(3, 2, expression(symbol("\\044")))
|
| 300 |
text(1, 3, "suchthat", adj=0); text(2.5, 3, "\\\\047")
|
300 |
text(1, 3, "suchthat", adj = 0); text(2.5, 3, "\\\\047")
|
| 301 |
text(3, 3, expression(symbol("\\047")))
|
301 |
text(3, 3, expression(symbol("\\047")))
|
| 302 |
text(1, 4, "therefore", adj=0); text(2.5, 4, "\\\\134")
|
302 |
text(1, 4, "therefore", adj = 0); text(2.5, 4, "\\\\134")
|
| 303 |
text(3, 4, expression(symbol("\\134")))
|
303 |
text(3, 4, expression(symbol("\\134")))
|
| 304 |
text(1, 5, "perpendicular", adj=0); text(2.5, 5, "\\\\136")
|
304 |
text(1, 5, "perpendicular", adj = 0); text(2.5, 5, "\\\\136")
|
| 305 |
text(3, 5, expression(symbol("\\136")))
|
305 |
text(3, 5, expression(symbol("\\136")))
|
| 306 |
text(1, 6, "circlemultiply", adj=0); text(2.5, 6, "\\\\304")
|
306 |
text(1, 6, "circlemultiply", adj = 0); text(2.5, 6, "\\\\304")
|
| 307 |
text(3, 6, expression(symbol("\\304")))
|
307 |
text(3, 6, expression(symbol("\\304")))
|
| 308 |
text(1, 7, "circleplus", adj=0); text(2.5, 7, "\\\\305")
|
308 |
text(1, 7, "circleplus", adj = 0); text(2.5, 7, "\\\\305")
|
| 309 |
text(3, 7, expression(symbol("\\305")))
|
309 |
text(3, 7, expression(symbol("\\305")))
|
| 310 |
text(1, 8, "emptyset", adj=0); text(2.5, 8, "\\\\306")
|
310 |
text(1, 8, "emptyset", adj = 0); text(2.5, 8, "\\\\306")
|
| 311 |
text(3, 8, expression(symbol("\\306")))
|
311 |
text(3, 8, expression(symbol("\\306")))
|
| 312 |
text(1, 9, "angle", adj=0); text(2.5, 9, "\\\\320")
|
312 |
text(1, 9, "angle", adj = 0); text(2.5, 9, "\\\\320")
|
| 313 |
text(3, 9, expression(symbol("\\320")))
|
313 |
text(3, 9, expression(symbol("\\320")))
|
| 314 |
text(1, 10, "leftangle", adj=0); text(2.5, 10, "\\\\341")
|
314 |
text(1, 10, "leftangle", adj = 0); text(2.5, 10, "\\\\341")
|
| 315 |
text(3, 10, expression(symbol("\\341")))
|
315 |
text(3, 10, expression(symbol("\\341")))
|
| 316 |
text(1, 11, "rightangle", adj=0); text(2.5, 11, "\\\\361")
|
316 |
text(1, 11, "rightangle", adj = 0); text(2.5, 11, "\\\\361")
|
| 317 |
text(3, 11, expression(symbol("\\361")))
|
317 |
text(3, 11, expression(symbol("\\361")))
|
| 318 |
}
|
318 |
}
|
| 319 |
\keyword{aplot}
|
319 |
\keyword{aplot}
|