Question: (Closed) making barplots from multiple files in R
0
gravatar for amit
5.3 years ago by
amit0
Singapore
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.4k views
ADD COMMENTlink modified 5.3 years ago by Istvan Albert ♦♦ 81k • written 5.3 years ago by amit0
1

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 5.3 years ago by Giovanni M Dall'Olio26k
1

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.

Cheers!

ADD REPLYlink modified 5.3 years ago • written 5.3 years ago by Istvan Albert ♦♦ 81k

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 5.3 years ago • written 5.3 years ago by amit0
Please log in to add an answer.
The thread is closed. No new answers may be added.

Help
Access

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