Question: (Closed) making barplots from multiple files in R
gravatar for amit
6.2 years ago by
amit0 wrote:

I am completely new to R, sorry for this basic question.

I have around 150 different csv files, in a folder. I am interested in two common columns with same headers, among the files and am trying to make barplots for these two colums for all the files, separately.

Could any body please suggest how to do this in a loop. I make barplot from a single file in following way.

>a <-read.table(file="test.txt", sep="\t", header=T)

> p_range<- range(a$cp,a$cm)

>barplot(a$cp, ylim=p_range)

>barplot(a$cm, add=T)



forum R • 1.6k views
ADD COMMENTlink modified 6.2 years ago by Istvan Albert ♦♦ 84k • written 6.2 years ago by amit0

For this type of purely-computational questions I would suggest you to write directly in StackOverflow. Let's keep Biostar specialized in bioinformatic related questions.

ADD REPLYlink written 6.2 years ago by Giovanni M Dall'Olio27k

Hello amit!

We believe that this post is does not fit the main topic of this site.

This question is primarly about how to use R. We are not an R support site.

For this reason we have closed your question. This allow us to keep the site focused on the topics that the community can help with.

If you disagree please tell us why in a reply below, we'll be happy to talk about it.


ADD REPLYlink modified 6.2 years ago • written 6.2 years ago by Istvan Albert ♦♦ 84k

Hi Istvan,

Thank you for feedback. Sorry for posting something like this, I will search more and will discuss this problem in R forums. I face this issue while making density plots for small RNA occupancy at different loci. I thought if by any chance somebody might have done similar analysis and knew a better way do it. Thanks!

ADD REPLYlink modified 6 months ago by RamRS27k • written 6.2 years ago by amit0
Please log in to add an answer.
The thread is closed. No new answers may be added.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1037 users visited in the last hour