Metadata Normalization
0
0
Entering edit mode
2.9 years ago
j_weld ▴ 10

how can I normalize my data look like this?

enter image description here

metadata R • 1.0k views
ADD COMMENT
0
Entering edit mode

You should put more effort into your questions, otherwise we won't be able to help you.

ADD REPLY
0
Entering edit mode

now my data look like this, and also this is the code

ggplot(data=marged_data, aes(x=Sample, y=kraken_assigned_reads, fill=name))+  geom_bar(aes(), stat="identity", position="stack")
ADD REPLY
0
Entering edit mode

Since you didn't provide any of your code I don't know what you did exactly, but you should be able to change geom_bar(position="stack") to geom_bar(position="fill").

ADD REPLY
0
Entering edit mode

This is the head of my data

          name kraken_assigned_reads Sample
 1    Gilliamella             7685     AghB
 2    Lactobacillus           50519    AghB
 3    Bifidobacterium         13518    AghB
 4    Snodgrassella           5273     AghB
 5    Frischella              3124     AghB 
 6    Gilliamella             2205     ArB
ADD REPLY
0
Entering edit mode

Please do not paste screenshots of plain text content, it is counterproductive. You can copy paste the content directly here (using the code formatting option shown below), or use a GitHub Gist if the content volume exceeds allowed length here.

code_formatting

ADD REPLY

Login before adding your answer.

Traffic: 1793 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6