Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
GAREL Marc
logisitic_microbio
Commits
d447e76b
Unverified
Commit
d447e76b
authored
Nov 13, 2017
by
Severine Martini
Committed by
GitHub
Nov 13, 2017
Browse files
updtaes
parent
90d3a872
Changes
2
Show whitespace changes
Inline
Side-by-side
server.R
View file @
d447e76b
# Shiny app allowing: plot and parameters for microbial growth dataset
# Severine Martini,
Marc Garel,
Christian Tamburini
#
Marc Garel,
Severine Martini, Christian Tamburini
### October 2017
...
...
@@ -19,38 +18,24 @@ shinyServer(function(input, output) {
do
<-
reactiveValues
(
data
=
dd
)
output
$
plot
<-
renderPlot
({
# plot(dd$H,dd$A, pch=19, xlab="Time(h)", ylab="DO600nm")
# lines(dd$H,SSlogis(summary(fit)$parameters[1,1],summary(fit)$parameters[2,1],summary(fit)$parameters[3,1]))
# crssce=data.frame(dd$H,dd$A)
# SSlogis(dd$H,asym,xmid,scal)
# coef=getInitial(dd$A~SSlogis(dd$H,asym,xmid,scal),data=crssce)
# lines(dd$H,SSlogis(dd$H,coef[1],coef[2],coef[3]),lwd=1.5,col="blue")
# grid(col="grey")
##############
x
=
rep
(
dd
[,
1
],
ncol
(
dd
)
-1
)
y
=
unlist
(
dd
[,
2
:
ncol
(
dd
)])
crssce
=
data.frame
(
y
,
x
)
w0
=
seq
(
0
,
90
)
#modlog2=nls(x ~ SSlogis(y,Asym,xmid,scal),crssce)
modlog
=
nls
(
y
~
SSlogis
(
x
,
Asym
,
xmid
,
scal
),
crssce
)
# limit axes extended
maxx
=
max
(
x
,
na.rm
=
T
)
+
(
max
(
x
,
na.rm
=
T
)
/
4
)
maxy
=
max
(
y
,
na.rm
=
T
)
+
(
max
(
y
,
na.rm
=
T
)
/
4
)
w0
=
seq
(
0
,
maxx
)
# modlog2=nls(x ~ SSlogis(y,Asym,xmid,scal),crssce)
# modlog=nls(y ~ SSlogis(x,Asym,xmid,scal),crssce)
coef
=
getInitial
(
y
~
SSlogis
(
x
,
asym
,
xmid
,
scal
),
data
=
cbind.data.frame
(
x
,
y
))
mu
=
1
/
coef
[
3
]
# output plot
plot
(
x
,
y
)
points
(
x
,
y
,
xlim
=
c
(
0
,
90
),
ylim
=
c
(
0
,
1.1
),
xlab
=
"temps(h)"
,
ylab
=
"DO600nm"
,
las
=
1
,
pch
=
22
,
bg
=
1
)
points
(
x
,
y
,
xlim
=
c
(
0
,
maxx
),
ylim
=
c
(
0
,
maxy
),
xlab
=
"temps(h)"
,
ylab
=
"DO600nm"
,
las
=
1
,
pch
=
22
,
bg
=
1
)
lines
(
w0
,
SSlogis
(
w0
,
coef
[
1
],
coef
[
2
],
coef
[
3
]),
lwd
=
1.5
)
# ou, ce qui revient au même
#x=dd[,1]
#y=dd[]
#coef=getInitial(y~SSlogis(x,asym,xmid,scal),data=cbind.data.frame(x,y))
#mu=1/coef[3]
#plot(x,y)
#points(x,y,xlim=c(0,90),ylim=c(0,1.1),xlab="temps(h)",ylab="DO600nm",las=1,pch=22,bg=1)
#lines(w0,SSlogis(w0,coef[1],coef[2],coef[3]),lwd=1.5)
###############
observeEvent
(
input
$
clicks
,
{
print
(
as.numeric
(
do
$
data
))})
...
...
ui.R
View file @
d447e76b
#
#
#
Shiny app allowing: plot and parameters for microbial growth dataset
#
Marc Garel, Severine Martini, Christian Tamburini
### October 2017
library
(
shiny
)
shinyUI
(
fluidPage
(
headerPanel
(
"
Welcome
o
n
a
growth curve app
"
),
headerPanel
(
"
Application
o
f
a
logistic model on microbial datasets
"
),
# load dataset
titlePanel
(
"Upload file"
),
sidebarLayout
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment