Re: [R] not a good way to reply on "How to save components in pls model"

2019-06-23 Thread Jeff Newmiller
ccd to the list, as this is about R-help. It appears that you do not think I replied respectfully to your question. I am sorry you feel that way, but I genuinely do not understand what you are trying to accomplish, and I do think the reason I am not understanding is because you need to be more

Re: [R] How to extract data based on first column ID in R

2019-06-23 Thread Yogesh Gupta
Thanks, David, It is resolved now. I used below code dim(otu.list) [1] 196 1 i <- row.names(data) %in% otu.list[[1]] Thanks Yogesh On Sun, 23 Jun 2019, 21:38 David Winsemius, wrote: > > > On Jun 23, 2019, at 5:57 AM, Yogesh Gupta wrote: > > > > Hi, > > > > I need help to extract

Re: [R] How to allow duplicate names in R

2019-06-23 Thread Jeff Newmiller
I don't know anything about gene sequencing analysis. You may find better expertise for that on the Bioconductor mailing list. On June 23, 2019 12:28:59 PM PDT, Yogesh Gupta wrote: >Thanks Jeff > >Actually these are Amplicon sequencing variant which are differ at >single >nucleotide but may

Re: [R] How to extract data based on first column ID in R

2019-06-23 Thread David Winsemius
> On Jun 23, 2019, at 5:57 AM, Yogesh Gupta wrote: > > Hi, > > I need help to extract data based on first column ID in R. > > I used the below code but not succeed , it is not giving the row values, > only showing the header of rows. > >> head(data) > > > Root-1.S35.L001.

Re: [R] Problem witth nnet:multinom

2019-06-23 Thread David Winsemius
> On Jun 21, 2019, at 10:58 AM, Tom Woolman wrote: > > I am using R with the nnet package to perform a multinomial logistic > regression on a training dataset with ~5800 training dataset records and 45 > predictor variables in that training data. Predictor variables were chosen as > a

Re: [R] How to allow duplicate names in R

2019-06-23 Thread Yogesh Gupta
Thanks Jeff Actually these are Amplicon sequencing variant which are differ at single nucleotide but may belongs to same genus, or further may be same species, but may be different bacterial strain, so I will think about it what should I do, may be I can plot with OTU ID and genus together...or

Re: [R] How to save components in pls model

2019-06-23 Thread Jeff Newmiller
By one obvious measure of "save" it looks like you already did save the results... they are in your `silt` object. What are you trying to accomplish? Also, please learn to send plain-text emails to this mailing list... the mailing list will strip out your formatting anyway, leaving more or

Re: [R] How to allow duplicate names in R

2019-06-23 Thread Jeff Newmiller
Some concepts are so fundamental that they get encoded into general-purpose code. The idea that each row (column) of a heat map should be uniquely identifiable among all other rows (columns) is one such idea. To break this rule you will have to create your own heatmap function. I strongly

Re: [R] How to allow duplicate names in R

2019-06-23 Thread Yogesh Gupta
I able to do it with the below code but in heat map it shows x at beginning of each names. x<-read.table("HEATMAP.ROOT.input.txt",sep="\t",head=T, check.names=TRUE) x2 <- x[,-1] rownames(x2) <- make.names(x[,1], unique = TRUE) head(x2) > head(x2) Root_T1 Root_T2

[R] How to allow duplicate names in R

2019-06-23 Thread Yogesh Gupta
Hi, I do have duplicates names in tab delimited files, I need to allow to read these duplicate names in R, Could you please suggest how can modify this code to allow to read duplicates names: x<-read.table("HEATMAP.ROOT.input.txt",sep="\t",head=T, check.names=FALSE) > x

[R] How to save components in pls model

2019-06-23 Thread Hossein Shafizadeh
Hello everyone, I want to *save the components *when using pls, I tried several ways but failed. No matter if using the caret package or in other coding formats. The code in the caret is: factors <- c("a","b","c") set.seed(123) silt <-

Re: [R] How to filter data in R based on first column ID

2019-06-23 Thread Rui Barradas
Hello, The previous 2 e-mails show that there is no match between otu.list and the row.names of data. Now I can see why, because otu.list is a dataframe, not a vector. Try instead i <- row.names(data) %in% otu[[1]] I assume that otu.list is a df with just *one* column. Check what

Re: [R] How to filter data in R based on first column ID

2019-06-23 Thread Yogesh Gupta
I have read data table and out.list in R like this: > data = read.table("Mymensingh_root_relative.percent.COUNT.txt",header=T,sep='\t',check.names=F) > otu.list = read.table("root_differential.OTU.list.txt",header=T,sep='\t',check.names=F) these both are tab delimited text files. *Thanks*

Re: [R] How to filter data in R based on first column ID

2019-06-23 Thread Yogesh Gupta
Hi Rui, Thanks for your help. but still I did not able to get the data. > dput(head(data)) structure(list(`Root-1.S35.L001` = c(0, 0, 0, 0, 0, 0.0467945718296678 ), `Root-10.S75.L001` = c(0, 0, 0, 0, 0, 0), `Root-13.S5.L001` = c(0, 0, 0, 0, 0, 0), `Root-14.S16.L001` = c(0, 0, 0, 0, 0, 0),

Re: [R] How to filter data in R based on first column ID

2019-06-23 Thread Yogesh Gupta
Hi Rui, Thanks for your help. but still I did able to get the data. > dput(head(data)) structure(list(`Root-1.S35.L001` = c(0, 0, 0, 0, 0, 0.0467945718296678 ), `Root-10.S75.L001` = c(0, 0, 0, 0, 0, 0), `Root-13.S5.L001` = c(0, 0, 0, 0, 0, 0), `Root-14.S16.L001` = c(0, 0, 0, 0, 0, 0),

Re: [R] How to filter data in R based on first column ID

2019-06-23 Thread Rui Barradas
Hello, Please always cc the list. The data you have posted has the values you want to match as *row.names*, not as the first column values. This is why it is important to follow the posting guide and post datasets as it suggests, in dput() format. dput(head(data))# post the output of

Re: [R] How to change x axes labels in plot_ly?

2019-06-23 Thread John Kane
Could you supply some code and sample data. The data should be in dput() format. The way the data has arrived is very difficult to read. I have never heard of ploty. Is that a typo? To answer your direct question, yes you should be able to change the x-axis labels but we need to get some idea of

Re: [R] How to extract data based on first column ID in R

2019-06-23 Thread Thevaraja, Mayooran
Hello Check out following link: https://dzone.com/articles/learn-r-how-extract-rows https://stat.ethz.ch/R-manual/R-devel/library/base/html/Extract.data.frame.html Cheers Mayooran Sent from Mail for Windows 10 From:

[R] How to extract data based on first column ID in R

2019-06-23 Thread Yogesh Gupta
Hi, I need help to extract data based on first column ID in R. I used the below code but not succeed , it is not giving the row values, only showing the header of rows. > head(data) Root-1.S35.L001.Root-10.S75.L001 71f84e7910006f22684121564206e8ca 0.0

Re: [R] Recovering former projects on R

2019-06-23 Thread Eric Berger
RStudio has a panel with a tab 'History' (that panel also has tabs 'Environment' and 'Connections'). If you click on the 'History' tab and can see your relevant history, you can then highlight commands of interest and click the 'To Console' button. This copies the highlighted commands to the