Re: [R] Help with selection of continuous data

2021-06-22 Thread André Luis Neves
gt; > It's not 100% clear to me what you are asking. I am interpreting the > > question as selecting the data from those dates for which all of > > 1,2,3,4,5,6,7,8 appear in the ID column. > > My approach determines the dates satisfying this property, which I put > into > >

[R] Help with selection of continuous data

2021-06-21 Thread André Luis Neves
Dear R users, I want to select only the data containing a continuous number of *ID* from 1-8 in each *DATE*. Note, I do not want to select data that do not contain a continuous number in *ID *from 1-8 (eg. Data on *DATE* 1/2/2020, and 01/03/2020). The dataset is a huge matrix with 24 columns and

Re: [R] Help with strings

2020-09-29 Thread André Luis Neves
lcohol", x[, 3]), 3] > x > }) > > Sarah > > On Tue, Sep 29, 2020 at 4:24 PM André Luis Neves > wrote: > > > > Dear all, > > > > I have had difficulties copying the word "alcohol" in the "vehicle" > column > >

[R] Help with strings

2020-09-29 Thread André Luis Neves
Dear all, I have had difficulties copying the word "alcohol" in the "vehicle" column to replace the string in the column "accident_type". It is a huge list but I have prepared a workable and simple example below and the desired output. I am sure you guys can give me some advice on how to deal

Re: [R] Help with the plot function

2017-06-20 Thread André Luis Neves
ot;Temperature (°C)", side=2, padj=-3) legend(1999,10, bty="n", lty = c(2,3,4), lwd = c(2,2,2), pch = c(0,8,2), legend = c("March","April","May")) Thank you very much, Andre On Tue, Jun 20, 2017 at 1:12 AM, André Lu

Re: [R] Help with the plot function

2017-06-20 Thread André Luis Neves
ann=F, axes=F, xlim=c(1996,2004), > ylim=c(0,12), data=g1) > > title(ylab="Temperature (°C)",xlab="Year") > axis(1, at=seq(1996, 2004, 2)) > axis(2, at=c(0,3,6,9,12), las=2) > > I am quite close to what you probably expect. You need modify axes and > thei

Re: [R] Help with the plot function

2017-06-19 Thread André Luis Neves
; -- Bert > > > Bert Gunter > > "The trouble with having an open mind is that people keep coming along > and sticking things into it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Mon, Jun 19, 2017 at 7:01 PM, André Luis Neves <

Re: [R] Help with the plot function

2017-06-19 Thread André Luis Neves
to it." > -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > > On Mon, Jun 19, 2017 at 6:30 PM, André Luis Neves <andrl...@ualberta.ca> > wrote: > > Dear friends, > > > > I have the following dataframe: > > > > YEAR <- c(1

[R] Help with the plot function

2017-06-19 Thread André Luis Neves
Dear friends, I have the following dataframe: YEAR <- c(1996 , 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 ) T_MAR <- c(2.8, 6.5, 5.4,2.4, 4, 4.1, 3, 4.4, 4.5) T_APR <- c(5.7, 7.8, 7.7, 4.6, 4.7, 6.2,5.7, 5.9, 7) T_MAY <- c(7, 8.8, 10, 6, 5.5, 7.6, 8.5, 7.3, 10.2) BUD <- c(87, 98, 93, 85, 89,

Re: [R] Heatmap help

2017-03-04 Thread André Luis Neves
tfun = function(y) dist(y, method = "euclidean"), hclustfun = function(y) hclust(y, method = "median"), scale = "row",cexCol = 1, cexRow = 0.9, ylab = "Enzymes", xlab = "Samples", margins = c(9,9), keysize = 1, main=

[R] Heatmap help

2017-03-03 Thread André Luis Neves
Dear all, I was wondering if you could help me to construct a heat map, in which the columns are sorted by sample type (A first and then B). My reproducible example below runs, but the columns of the heatmap are not organized in the way I would like because it has first sampleA, SampleB, sampleA,

Re: [R] Help with data management

2017-02-24 Thread André Luis Neves
frames into a single one and use xtabs: > > ID <- names(mylist) > mylist <- Map(data.frame, mylist, dfn=ID) > mydf <- do.call(rbind, mylist) > mydf$Family <- factor(mydf$Family, levels=sort(levels(mydf$Family))) > xtabs(Hits~Family+dfn, mydf) > # dfn > # Family A

Re: [R] Help with data management

2017-02-24 Thread André Luis Neves
gt; # a 0 3 0 > # c 1 1 0 > # d 2 0 0 > # e 3 0 0 > # f 0 4 5 > # o 0 0 4 > # q 0 0 10 > > > ----- > David L Carlson > Department of Anthropology > Texas A University > Coll

[R] Help with data management

2017-02-23 Thread André Luis Neves
Dear R users, I have the following dataframes (A, B, and C) stored in a list: A= data.frame(c("c", "d", "e"),4.4:6.8,c(1,2,3)) colnames(A) <- c ("Family", "NormalizedCount", "Hits") A B= data.frame(c("c", "f", "a"),c(3.2,6.4, 4.4), c(1,4,3)) colnames(B) <- c ("Family", "NormalizedCount",

Re: [R] Help

2016-11-18 Thread André Luis Neves
st), function(i)setNames(mylist[[i]], c("CaZyme", > names(mylist)[i]))) > [[1]] > CaZyme A > 1 1 3 > 2 2 3 > > [[2]] > CaZyme B > 1 1 3 > 2 2 3 > > [[3]] > CaZyme C > 1 1 4 > 2 2 5 > > On Fri, Nov 18,

[R] Help

2016-11-18 Thread André Luis Neves
Dear, I have the following list (mylist), in which I need to pass to the column 2 the name of the list itself. So, running the follwing commands: A= data.frame(1:2,3) B= data.frame(1:4,3) C= data.frame(c(1:2),c(4:5)) mylist=list(A=A,B=A,C=C) lapply(mylist, setNames, paste(c("CaZyme"))) The

[R] Replicate

2016-08-23 Thread André Luis Neves
Hi, There! I have this data frame: > plotdat2 FirmicutesLowerUpper fTissue2 1 63.48023 59.15983 68.11614 CAECUM 2 61.42512 57.24651 65.90875COLON 3 44.68343 41.62523 47.96632RUMEN How can I replicate each line 100 times? I`m new in R command line, so sorry if my

[R] How to do it in R

2016-06-24 Thread André Luis Neves
Dear all, I`ve got to calculate the ratio of methanogens to bacteria, but I wouldn`t like to divide the total copy numbers of methanogens ( on average 10^8) by bacteria (10^10) because they have different exponents and bases. So, my idea is to standardize both microorganisms counts to 10^3.

Re: [R] From NUM to INT

2016-04-26 Thread André Luis Neves
your help. Best regards, Andre On Tue, Apr 26, 2016 at 4:11 PM, Bert Gunter <bgunter.4...@gmail.com> wrote: > Inline. > > -- Bert > > > On Tue, Apr 26, 2016 at 2:25 PM, André Luis Neves <andrl...@ualberta.ca> > wrote: > > Ok. I`m trying to run a Poisso

Re: [R] From NUM to INT

2016-04-26 Thread André Luis Neves
ot; keeping the > precision that you might need. > > > Jim Holtman > Data Munger Guru > > What is the problem that you are trying to solve? > Tell me what you want to do, not how you want to do it. > > On Tue, Apr 26, 2016 at 1:11 PM, André Luis Neves <andrl...@ualber

[R] From NUM to INT

2016-04-26 Thread André Luis Neves
Dear all: I converted the columns (Baci, Meti, Fungii, Protozoai) into integers (using excel) and then imported the data (.txt) into R. Interestingly, the other three variables were loaded as INT, but the 'Baci' one continued as Num. I imported the data using the following command line: X <-

[R] Num to INT

2016-04-25 Thread André Luis Neves
Hi there: I transformed four columns of values in my dataset into an integer using excel, but when I imported the dataset into R, it is still reading one of the columns as NUM. Then, I used as.integer function to convert the remaining column into INT, but unfortunately, it is replacing the values

[R] Plot help

2016-03-18 Thread André Luis Neves
Dear all: I was wondering how I modify the plot command below so that the y-axis displays the numbers in a 4 by 4 scale. It looks like the plot generated by the commands below shows the y-axis in a 5 by 5 scale: Values <- c(1/16, 1/8, 1/4, 1/2, 1, 2, 4, 8, 16) Values Log <- log2(Values)

[R] List funtion

2016-03-15 Thread André Luis Neves
Dear, I have the following data: v1 <- c(8,4,9,12) v2 <- c(7, 8, 11) my_list <- list(v1,v2) rep (my_list,3) My question is how I can modify my command line to create a list called my_list containing two copies of the first vector (v1) and three copies of the vector 2 (v2). The above command

[R] Two-way cluster

2016-01-28 Thread André Luis Neves
Dear everyone, I`d like to make a two-way cluster combined with a heatmap, and was wondering if you could give me a hand. I have just two variables (x and y). I would like that x variable should be placed in the x axis and y variable in the y axis. I m running lots of examples, but unfortunately

[R] Statistic_help

2015-08-17 Thread André Luis Neves
Hi Everyone, I have an experimental design that I'm confused about what model/approach I should use to do the data analysis, and I would like to ask you for help as there are many excellent statisticians and scientists in this group that could help me to solve this problem. The design is like

[R] Help

2015-08-14 Thread André Luis Neves
Dear everyone, Would like to know how to add asterisks and arcs that indicate a subgroup comparison above box plots to denote statistical diference. Thank you. Andre [[alternative HTML version deleted]] __ R-help@r-project.org mailing list