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
Amine GHOZLANE
shaman
Commits
adc4f32a
Commit
adc4f32a
authored
Jul 21, 2016
by
svolant
Browse files
Modification header counts
parent
7936ac9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
server.R
View file @
adc4f32a
...
...
@@ -27,7 +27,8 @@ shinyServer(function(input, output,session) {
if
(
is.null
(
inFile
))
return
(
NULL
)
data
=
read.csv
(
inFile
$
datapath
,
sep
=
"\t"
,
header
=
TRUE
)
data
=
read.csv
(
inFile
$
datapath
,
sep
=
"\t"
,
header
=
TRUE
,
check.names
=
FALSE
)
colnames
(
data
)
=
gsub
(
"-"
,
"."
,
colnames
(
data
))
## Rownames
if
(
!
TRUE
%in%
duplicated
(
data
[,
1
]))
rownames
(
data
)
=
data
[,
1
];
data
=
data
[,
-1
]
...
...
@@ -408,11 +409,13 @@ shinyServer(function(input, output,session) {
data
=
read.csv
(
inFile
$
datapath
,
sep
=
"\t"
,
header
=
TRUE
)
## Replace "-" by "."
data
=
as.data.frame
(
apply
(
data
,
2
,
gsub
,
pattern
=
"-"
,
replacement
=
"."
))
rownames
(
data
)
<-
as.character
(
data
[,
1
])
ind
=
which
(
rownames
(
data
)
%in%
colnames
(
counts
))
target
=
data
[
ind
,]
## Replace "-" by "."
target
=
as.data.frame
(
apply
(
target
,
2
,
gsub
,
pattern
=
"-"
,
replacement
=
"."
))
#
target = as.data.frame(apply(target,2,gsub,pattern = "-",replacement = "."))
#ord = order(rownames(data))
#data = data[ord,]
...
...
Write
Preview
Supports
Markdown
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