Commit f62f6705 authored by cgebhard's avatar cgebhard
Browse files

Imported sources

parents
File added
plot(annual97[,c("Ca","Mg","K","Na","NH4","NO3","Cl","SO4","H")])
plot(annual97[,c("Ca","Mg","K","Na","NH4")])
annual97[,c("NO3","Cl","SO4","H")]
plot(annual97[,c("NO3","Cl","SO4","H")])
plot(annual97[,c("Ca","NO3","Cl","SO4","H")])
plot(annual97[,c("SO4","H")])
annual97.duplic<-annual97[,c("SO4","H")][!duplicated(annual97$SO4)]
annual97.zwei<-annual97[,c("SO4","H")]
annual97.dupli<-annual97.zwei[!duplicated(annual97.zwei$SO4)]
annual97.dupli<-annual97.zwei[!duplicated(annual97.zwei$SO4),]
annual.dupli
annual97.dupli
annual97.duplic<-annual97[,c("SO4","H")][!duplicated(annual97$SO4),]
annual97.duplic
plot(annual97.duplic)
x11()
plot(annual97.duplic)
write.table(annual97.duplic,"acid.txt",quote=F,row.names=F)
q()
annual87.duplic<-annual87[,c("SO4","H")][!duplicated(annual87$SO4),]
plot(annual87.duplic)
annual87.duplic
plot(annual87.duplic$SO4,annual.duplic$H)
plot(annual87.duplic$SO4,annual87.duplic$H)
annual87.duplic<-annual87[,c("SO4","H")][!duplicated(annual87$SO4)!=-9.00,]
annual87.duplic
annual87.duplic<-annual87[,c("SO4","H")][!duplicated(annual87$SO4),]
annual87.duplic
annual87.duplic[annual87.duplic$SO4!=-9.00,]
plot(annual87.duplic[annual87.duplic$SO4!=-9.00,])
write.table(annual87.duplic[annual87.duplic$SO4!=-9.00,],"acid1.txt",quote=F,row.names=F)
q()
dyn.load("change.so")
dyn.load("claudia.so")
max.entropy(A.test,1,2)
max.entropy <- function(A,f,s)
{
A <- as.matrix(A)
na <- dim(A)[1]
f <- as.integer(f)
ns <- as.integer(s)
e <- na-f
ans <- .Fortran("change",
A=as.double(A),
na=as.integer(na),
f=as.integer(f),
e=as.integer(e),
S=integer(e),
ns=as.integer(ns),
opt=double(1),
integer(na),
integer(na),
double(na),
double(na*na),
double(na*na),
double(na*na),
double(na),
double(na)
)
list(S=ans$S,opt=ans$opt)
}
max.entropy(A.test,1,2)
cont
max.entropy(A.test,1,2)
q()
dyn.load("claudia.so")
max.entropy(A.test,1,2)
q()
dyn.load("claudia.so")
max.entropy(A.test,1,2)
q()
dyn.load("claudia.so")
max.entropy(A.test,1,2)
q()
dyn.load("claudia.so")
max.entropy(A.test,1,2)
quit
q()
dyn.load("claudia.so")
max.entropy(A.test,1,2)
q()
dyn.load("claudia.so")
max.entropy(A.test,1,2)
max.entropy <- function(A,f,s)
{
A <- as.matrix(A)
na <- dim(A)[1]
f <- as.integer(f)
ns <- as.integer(s)
e <- na-f
ans <- .Fortran("grddl",
A=as.double(A),
na=as.integer(na),
f=as.integer(f),
e=as.integer(e),
S=integer(e),
ns=as.integer(ns),
opt=double(1),
integer(na),
integer(na),
double(na),
double(na*na)
)
list(S=ans$S,opt=ans$opt)
}
max.entropy(A.test,1,2)
max.entropy(A.test,1,2)
q()
dyn.load("claudia.so")
max.entropy <- function(A,f,s)
{
A <- as.matrix(A)
na <- dim(A)[1]
f <- as.integer(f)
ns <- as.integer(s)
e <- na-f
ans <- .Fortran("grddl",
A=as.double(A),
na=as.integer(na),
f=as.integer(f),
e=as.integer(e),
S=integer(e),
ns=as.integer(ns),
opt=double(1),
integer(na),
integer(na),
double(na),
double(na*na)
)
list(S=ans$S,opt=ans$opt)
}
max.entropy(A.test,1,2)
cont
q()
Current directory is /usr/local/R/bin/
GDB is free software and you are welcome to distribute copies of it
under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16.patched (i486-unknown-linux --target i486-linux),
Copyright 1996 Free Software Foundation, Inc...
(gdb) cd ~/TeX/Diss/daten/NE-USA
Working directory /home/users/cgebhard/TeX/Diss/daten/NE-USA.
(gdb) run
Starting program: /usr/local/R/bin/R.binary
R : Copyright 1998, The R Development Core Team
Version 0.63.0 (November 14, 1998)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
[Previously saved workspace restored]
> ls()
[1] "A.Cov.mat" "A.mat" "A.test"
[4] "C0" "E.dist" "N.dist"
[7] "annual" "annual87" "annual87.SO4"
[10] "annual87.SO4.red" "annual87.estvar" "annual87.prs"
[13] "annual87.pts" "annual87.vmod.spher" "annual97"
[16] "coord" "coord1" "coord2"
[19] "dgrid" "grid" "grid.krige.spher"
[22] "ind.E" "ind.F" "station.coord"
[25] "station87" "station87.red" "station87.sub"
[28] "station97" "station97.add" "tmp"
[31] "x.range" "y.es.range" "y.range"
> dyn.load("grddl.so")
>
Program received signal SIGINT, Interrupt.
0x4018301c in __select (nd=-1073745467, in=0xbffff1ac, out=0xbffff5b0,
ex=0x8083eab, tv=0x405a7e78)
(gdb) break grddl_
Breakpoint 1 at 0x4079cad0: file grddl.f, line 10.
(gdb) cont
Continuing.
> tmp <- .Fortran("grddl",as.double(A.test),as.integer(dim(A.test)[1]),as.integer(1),integer(2),as.integer(2),double(1))
Breakpoint 1, grddl_ (a=0x4078e3a0, na=0x4078e398, f=0x4078e390, s=0x4078e388,
ns=0x4078e380, opt=0x4078e378) at grddl.f:10
Source file is more recent than executable.
Current language: auto; currently fortran
(gdb) f: 1
(gdb) na-f: 4
(gdb) na: 5
(gdb) i: 1 2
(gdb) na: 5
(gdb) i: 2 3
(gdb) na: 5
(gdb) i: 3 4
(gdb) na: 5
(gdb) i: 4 8
(gdb) i: 1 1
(gdb) i: 2 2
(gdb) i: 3 3
(gdb) i: 4 4
(gdb) print cards
$1 = -1073745828
(gdb) print f
$2 = (PTR TO -> ( integer )) 0x4078e390
(gdb) print F
$3 = 1.6071428571428572
(gdb) print CARDS
No symbol "CARDS" in current context.
(gdb) print jmin
$4 = 1
(gdb) print S
$5 = ()
(gdb) print S(1)
$6 = 15.34256653809200505143850445932685
(gdb) print S(2)
$7 = 6.5764733869006153769466715974800763
(gdb) 5 4 2
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
`/home/users/cgebhard/TeX/Diss/daten/NE-USA/grddl.so' has changed; re-reading symbols.
Error in re-setting breakpoint 1:
Cannot access memory at address 0x4079c9f0.
Starting program: /usr/local/R/bin/R.binary
R : Copyright 1998, The R Development Core Team
Version 0.63.0 (November 14, 1998)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
[Previously saved workspace restored]
> dyn.load("grddl.so")
find_solib: Can't read pathname for load map: I/O error
(gdb) cd ~/TeX/Diss/daten/NE-USA
Working directory /home/users/cgebhard/TeX/Diss/daten/NE-USA.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/R/bin/R.binary
Cannot access memory at address 0x73.
(gdb)
(gdb)
(gdb) file /usr/local/R/bin/R.binary
A program is being debugged already. Kill it? (y or n) y
Load new symbol table from "/usr/local/R/bin/R.binary"? (y or n) y
Reading symbols from /usr/local/R/bin/R.binary...done.
Error in re-setting breakpoint 1:
Cannot access memory at address 0x4079c9f0.
(gdb) delete
Delete all breakpoints? (y or n) y
(gdb) file /usr/local/R/bin/R.binary
Load new symbol table from "/usr/local/R/bin/R.binary"? (y or n) y
Reading symbols from /usr/local/R/bin/R.binary...done.
(gdb) cd ~/TeX/Diss/daten/NE-USA
Working directory /home/users/cgebhard/TeX/Diss/daten/NE-USA.
(gdb) run
Starting program: /usr/local/R/bin/R.binary
R : Copyright 1998, The R Development Core Team
Version 0.63.0 (November 14, 1998)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
[Previously saved workspace restored]
> dyn.load("grddl.so")
>
Program received signal SIGINT, Interrupt.
0x4018301c in __select (nd=-1073745465, in=0xbffff1ac, out=0xbffff5b0,
ex=0x8083eab, tv=0x405a7e78)
(gdb) break grddl_
Breakpoint 2 at 0x4079cabd: file grddl.f, line 10.
(gdb) Continuing.
> tmp <- .Fortran("grddl",as.double(A.test),as.integer(dim(A.test)[1]),as.integer(1),integer(2),as.integer(2),double(1))
Breakpoint 2, grddl_ (a=0x4078e3a0, na=0x4078e398, f=0x4078e390, e=0x4078e388,
s=0x4078e380, ns=0x4078e378, opt=0x0) at grddl.f:10
Source file is more recent than executable.
Current language: auto; currently fortran
(gdb) f: 1
(gdb) e: 0
(gdb) delete
Delete all breakpoints? (y or n) y
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /usr/local/R/bin/R.binary
R : Copyright 1998, The R Development Core Team
Version 0.63.0 (November 14, 1998)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
[Previously saved workspace restored]
> dyn.load("grddl.so")
>
Program received signal SIGINT, Interrupt.
0x4018301c in __select (nd=-1073745464, in=0xbffff1ac, out=0xbffff5b0,
ex=0x8083eab, tv=0x405a7e78)
Current language: auto; currently c
(gdb) break grddl_
Breakpoint 3 at 0x4079cabd: file grddl.f, line 10.
(gdb) Continuing.
tmp <- .Fortran("grddl",as.double(A.test),as.integer(dim(A.test)[1]),as.integer(1),as.integer(4),integer(2),as.integer(2),double(1))
Breakpoint 3, grddl_ (a=0x4078e398, na=0x4078e390, f=0x4078e388, e=0x4078e380,
s=0x4078e378, ns=0x4078e370, opt=0x4078e368) at grddl.f:10
Current language: auto; currently fortran
(gdb) f: 1
(gdb) e: 4
(gdb) break grddl.f:25
Breakpoint 4 at 0x4079d080: file grddl.f, line 25.
(gdb) Continuing.
i: 1 2
i: 2 3
i: 3 4
i: 4 5
i: 1 1
i: 2 0
i: 3 0
i: 4 0
i: 5 0
Breakpoint 4, grddl_ (a=0x4078e398, na=0x4078e390, f=0x4078e388, e=0x4078e380,
s=0x4078e378, ns=0x4078e370, opt=0x4078e368) at grddl.f:25
(gdb) 5 1 2
(gdb) --> 1 4
(gdb) 2 3
(gdb) 3 4
(gdb) 4 5
(gdb) ni: 4
(gdb) As: 0.641676003 -0.154564519 -0.133501561 -0.0911383413 0.0991803428
0.626346241 -0.467468799 -0.348668419 0.0856647483 0.292797325 0.493366012
0.0438796801 0.0584812866 0.218387154 -0.0216487428 0.559251472 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
(gdb)
RCOND: 0.256092393
(gdb) DET: 1.10893639 -1. 4
(gdb) 0.110893639
(gdb) print ni
$1 = 5
(gdb) -2.37707432E-310
(gdb) print detmax
$2 = 0.11089363941842008
(gdb) step
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
-3.95553447E-311
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) print ni
$3 = 5
(gdb) Continuing.
-1.74124388E-310
4 1 2
--> 2 4
2 4
3 5
ni: 3
As: 0.641676003 -0.133501561 -0.0911383413 0.0856647483 0.630239625
-0.127634688 0.0584812866 0.0804404378 0.626079126 -0.0951227752
0.0991803428 -0.00639020562 0.626279821 -0.4672274 -0.10906542 0.0856647483
-0.017532474 0.292615093 0.493021855 -0.399941369 4.24242131E-309
-8.68206458E-310 -6.64645841E-310 3.96196046E-309 -1.42947581E-309 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0..
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
RCOND: 0.679697297
DET: 2.53192436 -1. 3
0.253192436
0.110893639
1.08621575E-17
3 1 2
1 0
2 0
0.253192436
> q()
Save workspace image? [y/n/c]: y
Program exited normally.
(gdb) delete
Delete all breakpoints? (y or n) y
(gdb) run
`/home/users/cgebhard/TeX/Diss/daten/NE-USA/grddl.so' has changed; re-reading symbols.
`/home/users/cgebhard/TeX/Diss/daten/NE-USA/grddl.so' has changed; re-reading symbols.
Starting program: /usr/local/R/bin/R.binary
R : Copyright 1998, The R Development Core Team
Version 0.63.0 (November 14, 1998)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
[Previously saved workspace restored]
> dyn.load("grddl.so")
>
Program received signal SIGINT, Interrupt.
0x4018301c in __select (nd=-1073745464, in=0xbffff1ac, out=0xbffff5b0,
ex=0x8083eab, tv=0x405a7e78)
Current language: auto; currently c
(gdb) break grddl_
Breakpoint 5 at 0x4079cabd: file grddl.f, line 10.
(gdb) cont
Continuing.
tmp <- .Fortran("grddl",as.double(A.test),as.integer(dim(A.test)[1]),as.integer(1),as.integer(4),integer(2),as.integer(2),double(1))
Breakpoint 5, grddl_ (a=0x4078e398, na=0x4078e390, f=0x4078e388, e=0x4078e380,
s=0x4078e378, ns=0x4078e370, opt=0x4078e368) at grddl.f:10
Source file is more recent than executable.
Current language: auto; currently fortran
(gdb) f: 1
(gdb) e: 4
(gdb) i: 1 2
(gdb) i: 2 3
(gdb) i: 3 4
(gdb) i: 4 5
(gdb) i: 1 1
(gdb) i: 2 0
(gdb) i: 3 0
(gdb) i: 4 0
(gdb) i: 5 0
(gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) (gdb) 5 1 2
(gdb) --> 1 4
(gdb) 2 3
(gdb) 3 4
(gdb) 4 5
(gdb) ni: 4
(gdb) As: 0.641676003 -0.154564519 -0.133501561 -0.0911383413 0.0991803428
0.626346241 -0.467468799 -0.348668419 0.0856647483 0.292797325 0.493366012
0.0438796801 0.0584812866 0.218387154 -0.0216487428 0.559251472 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0.
(gdb) RCOND: 0.256092393
(gdb) DET: 1.10893639 -1. 4
(gdb) 0.110893639
(gdb) 0.154179842
(gdb) print detmax
$1 = 0.15417984243407726
(gdb) print ni
$2 = 4
(gdb) 0.137057871
(gdb) print detmax
$3 = 0.15417984243407726
(gdb) print ni
$4 = 4
(gdb) 0.121809958
(gdb) print detmax
$5 = 0.15417984243407726
(gdb) print cards
$6 = 1
(gdb) 4 1 2
(gdb) --> 1 4
(gdb) 2 4
(gdb) 3 5
(gdb) ni: 3
(gdb) As: 0.641676003 -0.133501561 -0.0911383413 0.0856647483 0.630239625
-0.127634688 0.0584812866 0.0804404378 0.626079126 -0.00639020562
0.626279821 -0.4672274 0.0856647483 -0.017532474 0.292615093 0.493021855
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
0. 0. 0. 0. 0. 0. 0. 0. 0.
(gdb) RCOND: 0.679697297
(gdb) DET: 2.53192436 -1. 3
(gdb) 0.253192436
(gdb) print ni
$7 = 3
(gdb) 0.249046395
(gdb) print detmax
$8 = 0.25319243619780574
(gdb) print detmax
$9 = 0.25319243619780574
(gdb) print ni
$10 = 3
(gdb) 0.248432974
(gdb) 3 1 2
(gdb) 1 0
(gdb) 2 0
(gdb) 0.253192436
(gdb) do_dotCode (call=0x40575014, op=0x40575640, args=0x40574ca4, env=0x401dd4b0)
at dotcode.c:347
Current language: auto; currently c
(gdb) Continuing.
> save.image()
> q()
Save workspace image? [y/n/c]: y
Program exited normally.
(gdb) quit
Inferior GDB finished
R : Copyright 1998, The R Development Core Team
Version 0.63.0 (November 14, 1998)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
[Previously saved workspace restored]
> help.start()
If netscape is already running, it is *not* restarted,
and you must switch to its window.
Otherwise, be patient..
> cor
function (x, y = NULL, use = "all.obs")
{
na.method <- pmatch(use, c("all.obs", "complete.obs", "pairwise.complete.obs"))
if (is.data.frame(x))
x <- as.matrix(x)
if (is.data.frame(y))
y <- as.matrix(y)
.Internal(cor(x, y, na.method))
}
> max.entropy max.entropy
Error: Object "max.entropy" not found
> source("max.entropy")
Error in parse(file, n, text, prompt) : unable to open file for parsing
> source("max.entropy.R")
> max.entropy
function (A, f, s)
{
A <- as.matrix(A)
na <- dim(A)[1]
f <- as.integer(f)
ns <- as.integer(s)
e <- na - f
storage.mode(z) <- "double"
ans <- .Fortran("grddl", A = as.double(A), na = as.integer(na),
f = as.integer(f), e = as.integer(e), S = integer(e),
ns = as.integer(ns), opt = double(1))
ans$opt
}
> max.entropy(A.test,1,2)
Error: Object "z" not found
> max.entropy <- function(A,f,s)
+ {
+ A <- as.matrix(A)
+ na <- dim(A)[1]
+ f <- as.integer(f)
+ ns <- as.integer(s)
+ e <- na-f
+ ans <- .Fortran("grddl",
+ A=as.double(A),
+ na=as.integer(na),
+ f=as.integer(f),
+ e=as.integer(e),