similar to: Joining Dataframes

Displaying 20 results from an estimated 900 matches similar to: "Joining Dataframes"

2007 Aug 13
3
Very new - beginners questions
Dear all, I have 4 sites and want to determine how different they are from each other. For this I have decided to use R though it seems a bit daunting to learn. I have read data in from a CSV the structure is : Species1 Species2 Species3 Site1 4 4 7 Site2 3 1 0 Site3 0 99 6 Site4 75 3 33 There are many more species than shown above this is just an example. Here are the
2005 Nov 03
4
merging dataframes
Dear List, I often have to merge two or more data frames containing unique row names but with some columns (names) common to the two data frames and some columns not common. This toy example will explain the kind of setup I am talking about: mat1 <- as.data.frame(matrix(rnorm(20), nrow = 5)) mat2 <- as.data.frame(matrix(rnorm(20), nrow = 4)) rownames(mat1) <- paste("site",
2008 Jan 25
4
Function for translation of a list into a matrix as used by ordination?
Hello. Does anyone know of an existing function that takes a list in the form of: Plot1 Species1 Abundance1 Plot1 Species2 Abundance2 Plot2 Species1 Abundance1 Plot2 Species3 Abundance3 . . . PlotN SpeciesN AbundanceN and translates into a matrix in the form of Species1 Species2.... SpeciesN Plot1 Abundance1 Abundance2... AbundanceN Plot2 Abundance1
2008 Jan 30
2
data.frame transformation
Dear all, maybe somebody can provide some help for this problem: Example: I've got the following dataframe "data": grid.id<-c(1:4) lat<-c(10,12,13,15) species1<-c(0,0,0,1) species2<-c(1,1,0,0) species3<-c(1,1,1,1) data<-data.frame(cbind(grid.id,lat,species1,species2,species3)) How can I, out of "data" make a new dataframe, where the cells of value
2005 Feb 24
2
Row median of Date class variables in a data frame
I am trying to calculate the median of each row of a data frame where the data frame consist of columns of class Date. Below are my test data and best attempt at using apply. I didn't see a solution via Google or the Baron search site. I'd be grateful for any suggestions or solutions. I'm using R 2.0.0 on Mac OS X. Thank you, Stephen Weigand ### Test data date1 <- c(1000,
2005 Dec 22
3
reading long matrix
Hi, I'm needing some help finding a function to read a large text file into an array in R. The data are essentially presence / absence / na data for many species and come as a grid with each species name (after two spaces) at the beginning of the matrix defining the map for that species. An excerpt could therefore be: SPECIES1 999001099 900110109 011101000 901100101 110100019 901110019
2011 Feb 03
3
R Data Manipulation - Transposing Data by a Given Column, Like User_ID
Hello, I'd like to transpose data to create an analysis-friendly dataframe. See below for an example, I was unable to use t(x) and I couldn't find a function with options like PROC TRANSPOSE in SAS. The ideal solution handles variable quantities of SITE - but beggars can't be choosers. :-) Thank you in advance, Mike ## INPUT DATA USER_ID<-c(1,1,1,2,2,2,3,3,4) SITE
2006 Aug 29
1
Bootstraping for groups and subgroups and joing with other table
Dear R-experts, I have a table with following collumns: State, SamplePlot, Species and BodySize. I sampled bird species at 34 SamplePlots and 5 States (regions) monthly during two years. On each bird record I measured bodysize and identified the species. So I have many records of each species (about 150 species) at each SamplePlot and each Region (State). Now I would like bootstrap
2012 Sep 03
1
Scatter plot from tapply output, labels of data
Hei, i am trying to plot the means of two variables (d13C and d15N), by 2 grouping factors (Species and Year) that i obtained by the function tapply. I would like to plot with different colours according to the Year and show the "Species" as data labels. My data looks like this: Species d13C d13N Year "Species1" 14,4 11.5 2009 "Species2"
2010 Nov 05
3
table with values as dots in increasing sizes
I was just thinking of a way to present data and if it is possible in R. I have a data frame that looks as follows (this is just mockup data). df location,"species1","species2","species3","species4","species5" "loc1",0.44,0.28,0.37,-0.24,0.41 "loc2",0.54,0.62,0.34,0.52,0.71 "loc3",-0.33,0.75,-0.34,0.48,0.61 location
2005 Feb 09
4
subset
Dear all, I am trying to extract rows from a data.frame based on the rowSums != 0. I want to preserve rownames in the first column in the subset. Does anyone know how to extract all species that don't have rowSums equal to zero? Here it is: # dataset x <- data.frame( species=c("sp.1","sp.2","sp.3","sp.4"), site1=c(2,3,0,0), site2=c(0,0,0,0),
2012 Mar 07
1
date columns chooser
i have a data frame with 2 columns of dates. with str(dataframe) i have ensured myself that they were indeed formatted as dates. one column has NA's in it. the aim is now to make a third column that chooses date1 if it is a date, and choose date2 if it is a NA. i am trying df$date3=ifelse(is.na(df$date1), df$date2, df$date1). this leads to unexpected behaviour: the resulting column is
2018 Feb 20
2
SAMBA failed join domain DC
On Tue, 20 Feb 2018 17:34:00 +0500 "denis.shigapov" <denis.shigapov at stroylandiya.ru> wrote: > Not join(( > samba-tool domain join example.ru DC -Uvas.lah --password=password > --realm=EXAMPLE.RU --site=SITE2 -d 4 'example.ru' is your dns domain name, you should be using your netbios domain name 'EXAMPLE' Who is 'vas.lah' ? does the user have
2011 Feb 06
2
Subsampling out of site*abundance matrix
Hello, How can I randomly sample individuals within a sites from a site (row) X species abundance (column) data frame or matrix? As an example, the matrix "abund2" made below. ##### (sorry, Im a newbie and this is the only way I know to get an example on here) abund1 <- c(150, 300, 0, 360, 150, 300, 0, 240, 150, 0, 60, 0, 150, 0, 540, 0, 0, 300, 0, 240, 300, 300,
2012 May 14
2
How to interpret an ANOVA result?
Hello all, here's a real-world example: I'm measuring a quantity (d) at five sites (site1 thru site5) on a silicon wafer. There is a clear site-dependence of the measured value. To find out if this is a measurement artifact I measured the wafer four times: twice in the normal position (posN), and twice rotated by 180 degrees (posR). My data looks like this (full, self-contained code at
2006 Sep 26
1
How to "Pack" a matrix
Hello, Suppose I have a matrix a where a= sp1 sp2 sp3 sp4 sp5 sp6 site1 1 0 1 1 0 1 site2 1 0 1 1 0 1 site3 1 1 1 1 1 1 site4 0 1 1 1 0 1 site5 0 0 1 0 0 1 site6 0 0 1 0 1 0 And I want to pack that matrix so that the upper left corner contains most of the ones and the bottom right corner contains most of the zeros so that matrix b is b= sp3 sp6 sp4 sp1 sp2 sp5 site1 1 1 1 1 0 0 site2
2008 May 02
3
data transformation
Dear all, how can I, with R, transform a presence-absence (0/1) matrix of species occurrences into a presence-only table (3 columns) with the names of the species (1st column), the lat information of the sites (2nd column) and the lon information of the sites (3rd column), as given in the below example? Thanks a lot for your help! Christian my dataframe: site lat lon spec1 spec2 spec3 spec4
2009 Jan 21
3
Error as.Date on Invalid Dates
Hi All, I have an script in R which accepts user inputs for certain parameters, particularly dates, which the user inputs as character strings. eg: > date1 <- "2009-01-21" The script later parses the input via the as.Date function: > as.Date(date1) However, as.Date encounters an error when the string does not represent an actual date. eg: > date1 <-
2005 Jul 12
3
adding a factor column based on levels of another factor
Hi R users Does anyone out there have a better/quicker way of adding a factor column to a data frame based on levels of another factor? I have a (large) data frame consisting of records for individual plants, each represented by a unique ID number. The species of each plant is indicated in the column "species", which is a factor column with many different levels (species). There are
2011 Nov 24
4
I cannot get species scores to plot with site scores in MDS when I use a distance matrix as input. Problems with NA's?
Hi, First I should note I am relatively new to R so I would appreciate answers that take this into account. I am trying to perform an MDS ordination using the function ?metaMDS? of the ?vegan? package. I want to ordinate species according to a set of functional traits. ?Species? here refers to ?sites? in traditional vegetation analyses while ?traits? here correspond to ?species? in such