Re: [R] Three way correspondence analyses?

2016-08-05 Thread Suparna Mitra
t;I100B", "I100C", "I100D", "I100E", "I100F", "I100G", "I123A", "I143A", "I143B", "I14A", "I14B", "I14C", "I14D", "I17A", "I17B", "I17C", "I17D"

[R] Three way correspondence analyses?

2016-08-02 Thread Suparna Mitra
Hello R experts, have some data for microbiome, metabolome and cytokine from the same sample. Now I want to do a three-way correspondence analyses. From three normalised data I was trying, #Now CCA with two data it works good like: Metab.Cytok.Microb.cca <- cca(normMicrobiome_NEC,normCytok_and_

[R] Writing multiple adonis output from multiple list file in R

2016-06-11 Thread Suparna Mitra
Hello R experts, I am trying to do adonis (vegan package) on multiple files using loop. But I am having hard time in this. Here is what I tried. setwd("PATH") files <- list.files(pattern = "[.]txt$") ldf <- lapply(files, read.table, row.names=1) str(ldf) res <- lapply(ldf, summary) for (i in le

[R] Propensity score matching with MatchIt

2016-01-11 Thread Suparna Mitra
Hello R experts, I am trying to do Propensity score matching for a medical data with two types of surgery. But somehow I am getting Summary of balance for all data and the matched data exactly similar resulting the Percent Balance Improvement as zero. > surgery.data<-read.csv(file.choose(), head =

Re: [R] Problem loading mvabund package

2015-08-28 Thread Suparna Mitra
Thank you Michael :) S On 28 August 2015 at 12:09, Michael Dewey wrote: > Dear Suparna, > > See below > > On 28/08/2015 10:22, Suparna Mitra wrote: > >> Hello, >>Can anybody please help me with mvabund package installation? >> I downloaded and installed

[R] Problem loading mvabund package

2015-08-28 Thread Suparna Mitra
Hello, Can anybody please help me with mvabund package installation? I downloaded and installed it. It seems installed, but I can't load the package. Here is what I tried: > install.packages("/Users/smitra/Documents/Soft/mvabund_3.10.4.tgz", repos = NULL, type="source") * installing *binary* p

[R] Fwd: Converting Lat Lon data in coordinates in R

2014-07-24 Thread Suparna Mitra
Hi ​Hello , ​Can anybody please let me know how can I convert Lat/Lon data in coordinates in R. I was trying to use the rgdal package ​ and proj4 package​ . But being bit confused how to use S or N information. ​and degree min second information. Any example help will be great.​ My da

Re: [R] [BioC] problem in getVarianceStabilizedData

2014-01-27 Thread Suparna Mitra
Thanks a lot Michael, Thats a great help. Best wishes, Suparna Dr. Suparna Mitra Department of Molecular and Clinical Pharmacology Institute of Translational Medicine University of Liverpool Block A: Waterhouse Buildings 1-5 Brownlow Street Liverpool L69 3GL Tel. +44 (0)151 795 5414 M: +44 (0

[R] problem in getVarianceStabilizedData

2014-01-26 Thread Suparna Mitra
Hi All, I am having a problem while running getVarianceStabilizedData in DDSeq2 package. data.vsd<-getVarianceStabilizedData(data) Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘dispersionFunction’ for signature ‘"CountDataSet"’ Though the func

[R] Bootstrap or subsampling using loop?

2013-11-25 Thread Suparna Mitra
Hello R experts, I am trying to do a job where I need to take random subsample from a data and then frequency count of that. Then the median or the frequency from say, 1000 replicates. Should I try this with subsample in loop or bootstrap? My data format is > str(Data) 'data.frame': 155752 obs.

[R] package seriation- how to manage font size and label margin

2013-09-02 Thread Suparna Mitra
Hello R experts, I am trying to use hmap from package seriation or bertinplot. I have two questions: How can I specify smaller font? I tried with pushViewport(viewport(layout=grid.layout(nrow = 1, ncol = 2), + gp = gpar(fontsize = 8))) but didn't work for the font with bertinplot. Also for hmap I

Re: [R] Changing legend to fill colour in ggplot

2013-07-02 Thread Suparna Mitra
Thanks a lot Biran, This is exactly what I was looking for. Thanks a ton. B est wishes, Mitra On 29 June 2013 02:51, Brian Diggs wrote: > On 6/27/2013 12:34 AM, Suparna Mitra wrote: > > Hello R experts, > >I am having a problem to edit legend in ggplot using four variab

[R] Changing legend to fill colour in ggplot

2013-06-27 Thread Suparna Mitra
Hello R experts, I am having a problem to edit legend in ggplot using four variables. My data structure is : str(df) 'data.frame': 10 obs. of 6 variables: $ id: Factor w/ 2 levels "639A","640": 1 1 1 1 1 2 2 2 2 2 $ species : Factor w/ 5 levels "acine

Re: [R] Error with metaMDS

2013-06-24 Thread Suparna Mitra
ferent dissimilarity metric that matches your expectations > numerically. > > Sarah > > > On Mon, Jun 24, 2013 at 7:33 AM, Suparna Mitra > wrote: > > H > > ello R-experts, > > I want to do ordination plots using vegan metaMDS. > > I have a where many cel

[R] Error with metaMDS

2013-06-24 Thread Suparna Mitra
H ello R-experts, I want to do ordination plots using vegan metaMDS. I have a where many cells have zero values. Data structure: X[1:10,1:14] Height.1 Height.2 Height.3 Height.4 Height.5 Height.6 Height.7 Height.8 Height.9 Height.10 Height.11 Height.12 Height.13 D30I1A 460

[R] Fwd: metaMDS Error, Nan similar or negative values

2013-06-23 Thread Suparna Mitra
Hello R experts and Vegan users, I am re-posting my msg as I didn't get any reply. I am not sure if it was not sent properly. Please help. Sorry for repeated post. I want to do ordination plots using vegan metaMDS. I have a where many cells have zero values. Data structure: X[1:10,1:14] H

[R] metaMDS Error, Nan similar or negative values

2013-06-22 Thread Suparna Mitra
H ello R-experts, I want to do ordination plots using vegan metaMDS. I have a where many cells have zero values. Data structure: X[1:10,1:14] Height.1 Height.2 Height.3 Height.4 Height.5 Height.6 Height.7 Height.8 Height.9 Height.10 Height.11 Height.12 Height.13 D30I1A 460

Re: [R] How to define desired numbers to a vector based on the present numbers

2013-06-21 Thread Suparna Mitra
;) >> >> cols <- rep(1:7, rle(x[order(x)])$lengths)[**order(order(x))] >> plot(x, col = cols) >> >> >> Hope this helps, >> >> Rui Barradas >> >> Em 21-06-2013 16:13, Suparna Mitra escreveu: >> >>> Hello R experts, >>

Re: [R] How to define desired numbers to a vector based on the present numbers

2013-06-21 Thread Suparna Mitra
your vector? Maybe the following will do. > > > x <- scan(text = " > > 43 43 43 43 0 39 13 39 50 39 39 23 23 32 0 13 32 23 32 23 0 13 13 0 > ") > > cols <- rep(1:7, rle(x[order(x)])$lengths)[**order(order(x))] > plot(x, col = cols) > > > Hope th

[R] How to define desired numbers to a vector based on the present numbers

2013-06-21 Thread Suparna Mitra
Hello R experts, I want to define desired numbers to a vector based on the present numbers. Can anybody please help me? Obviously I found worst ways to do it, but I believe there must be any better way. I have vector as > X [1] 43 43 43 43 0 39 13 39 50 39 39 23 23 32 0 13 32 23 32 23 0 13

Re: [R] how to add any extra word to existing column heading in R

2013-06-19 Thread Suparna Mitra
On 20 June 2013 13:04, Pascal Oettli wrote: > Hello, > > What did you try to do by yourself before to ask? > > Regards, > Pascal > > > > On 20/06/13 13:56, Suparna Mitra wrote: > >> Hello R experts, >>I want to add some extra words to number to

[R] how to add any extra word to existing column heading in R

2013-06-19 Thread Suparna Mitra
Hello R experts, I want to add some extra words to number to existing column header. Can anybody tell me how to do that. e.g. if I have a data.frame Height.1 Height.2 Height.6 Height.8 Height.10 Height.11 Height.17 Height.20 Height.22 Height.31 MBR174 720 104

[R] Creating subset using selected columns

2013-06-16 Thread Suparna Mitra
Hello R experts, I need a help to create a subset file. I know with subset comand, its very easy to select many different columns, or threshold. But here I have a bit problem as in my data file is big. And I don't want to identify the column numbers or names manually. I am trying to find any wa

[R] Rplot save problem after using "identify" with R version 3.0.0

2013-05-22 Thread Suparna Mitra
Hello R experts, I am having an wired problem to save my RPlot after I use "identify" option. Points are identified properly, but when I try to save that image I get error as: " Error: first argument must be a string (of length 1) or native symbol reference" and the image without identified points

Re: [R] Using loop for applying function on matrix

2013-05-21 Thread Suparna Mitra
t; #[2,] 78.571429 80.0 130 90.90909 55.6 > #[3,] 14.285714 20.0 40 45.45455 33.3 > #[4,] 71.428571 60.0 80 81.81818 55.6 > #[5,] 35.714286 40.0 70 72.72727 22.2 > A.K. > > - Original Message - > From: Suparna Mitra > To: Pascal

Re: [R] Using loop for applying function on matrix

2013-05-21 Thread Suparna Mitra
great, Thanks, Mitra Dr. Suparna Mitra Department of Molecular and Clinical Pharmacology Institute of Translational Medicine University of Liverpool Block A: Waterhouse Buildings 1-5 Brownlow Street Liverpool L69 3GL Tel. +44 (0)151 795 5414 M: +44 (0) 7523228621 Internal ext: 55401 On 21 May

[R] Using loop for applying function on matrix

2013-05-21 Thread Suparna Mitra
Hello R Experts, I need a bit of help in using loop. I have a matrix onto which I need to use several functions. In a simplified form suppose my matrix is > mdat [,1] [,2] [,3] [,4] [,5] [1,]12345 [2,] 11 12 13 10 10 [3,]23456 [4,] 109

[R] Problem with ordiellipse coloured factor in Vegan

2013-05-16 Thread Suparna Mitra
Hello R experts, I am trying to plot ordiellipse for my data but the col according to factors. Metabolites_raw= read.csv(file.choose(), head = TRUE) #file 21Metabolites.csv Metabolites_t=t(Metabolites_raw[,2:82]) ord <- metaMDS(Metabolites_t, distance="bray") symbol=as.numeric(Metab_metadata$

Re: [R] NMDS using Vegan

2013-05-15 Thread Suparna Mitra
> On Wed, 2013-05-15 at 12:06 +0800, Suparna Mitra wrote: >> Hello R experts, >> I am new to Vegan and use trying to follow the tutorial to perform NMDS >> for my data. But after performing the metaMDS, when I plotted my results >> the default plot shows MDS1 vs MDS2. Thou

[R] NMDS using Vegan

2013-05-14 Thread Suparna Mitra
Hello R experts, I am new to Vegan and use trying to follow the tutorial to perform NMDS for my data. But after performing the metaMDS, when I plotted my results the default plot shows MDS1 vs MDS2. Thought according to the tutorial Default ordination plot should display NMDS1vs NMDS2. Why is thi

[R] Error is assocplot

2011-04-14 Thread suparna mitra
Hello, I have a contingency table showing relation between two datasets. I tried to see association among them with the assocplot, but it shows error. mosaicplot of the same data worked perfectly. Can anyone please help me. Con.table=as.matrix(Con.table) > dim(Con.table) [1] 27 27 > assocplot(C

Re: [R] Creating a symmetric contingency table from two vectors with different length of levels in R

2011-04-06 Thread suparna mitra
s=c(levels(b),levels(a)[levels(a)%in%levels(b)==FALSE])) > table(a,b1) > > but be aware that levels of b is a subset of levels of a. > > Andrija > > On Wed, Apr 6, 2011 at 10:39 AM, suparna mitra < > mi...@informatik.uni-tuebingen.de> wrote: > >> Hello, &

[R] Creating a symmetric contingency table from two vectors with different length of levels in R

2011-04-06 Thread suparna mitra
Hello, How can I create a symmetric contingency table from two categorical vectors having different length of levels? For example one vector has 98 levels TotalData1$Taxa.1 [1] "Aconoidasida" "Actinobacteria (class)" "Actinopterygii" "Alphaproteobacteria" [5]

[R] ticklabs in scatterplot3d

2011-04-04 Thread suparna mitra
Hello, I am having a problem to control ticklabs in scatterplot3d. When I am using it for small data then it is working fine. But with my big data all the labels are misplaced (one upon another). For example see the code below (I have just modified the scatterplot3d example to show my problem ). =

Re: [R] Problem in 'Apply' function: does anybody have other solution

2009-06-17 Thread suparna mitra
uot; 45" " 45" " 9" " 25" " 25" " 753" But my all the datasets are in CSV format. I am reading those datasets as read.csv or read.delim Can anybody please suggest me how to this problem? Thanks and regards, Suparna. On Wed, Jun 17, 20

[R] Problem in 'Apply' function: does anybody have other solution

2009-06-17 Thread suparna mitra
Dear All, I am having some problem in apply function. I have some data like below. I want to get a range vector (which is max-min value for each row , ignoring NA values.) > Species.all[1:10,] V2 V3 V4 V5V6 V7V8 V9 1 57543 55938 47175 54922 36032 5785 29497 728

[R] How to build phylogenetic tree by R program from distance any distance matrix

2009-06-15 Thread suparna mitra
Hello R users, Can any one please help me to find a way to build phylogenetic tree by R program from any distance matrix. Suppose I have a data like : MATRIX [1] '1'0.0 [2] '2'0.071 0.0 [3] '3'0.036 0.286 0.0 [4] '4'0.429 0.75 0.714 0.0 [5] '5' 0.679 0.179 0.214 0.536 0.0 [6] '

[R] R: Best way to plot a Matrix of all possible pair combinations

2009-06-10 Thread suparna mitra
Hallo R Users, Please help I have some distance matrix data like > M[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.875 0.500 0.500 0.375 0.625 0. [2,] 0.8928571 1.000 0.000 0.8928571 0.1071429 0. [3,] 0.8928571 1.000

[R] Best way to plot a Matrix of all possible pair combinations

2009-06-10 Thread suparna mitra
Hallo R Users, I have some distance matrix data like > M[1:10,] [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.875 0.500 0.500 0.375 0.625 0. [2,] 0.8928571 1.000 0.000 0.8928571 0.1071429 0. [3,] 0.8928571 1.000 0.0

[R] Need some help in R : value more than equals to a row.

2009-06-07 Thread suparna mitra
Hallo, I was trying some code, but couldn't make one step of the code properly. Can anybody please help me? I have one matrix like this > values [,1] [,2] [,3] [,4] [,5] [1,] 0.778 0.3611 0. 0.139 0.000 [2,] 1.000 0. 0.53846154

[R] Need some help in R : value more than equals to a row.

2009-06-07 Thread suparna mitra
361 0.222 0.139 0.000 0.861 So there are two numbers more than equals to values[1,2] So > values.new[1,2]= 2/length(values[1,]) With best regard, Suparna -------- Ms Suparna Mitra Eberhard-Karls-Universität Tübingen Wilhelm-Schickard-Institut Algorithm