similar to: Replace Function (How to replace numbers in a data frame with a specific number)

Displaying 20 results from an estimated 300 matches similar to: "Replace Function (How to replace numbers in a data frame with a specific number)"

2012 Nov 12
2
order in stacked barplot
Hello i did a stacked barplot using ggplot and R arranged the bars of the items in different orders. i don?t know why. but i want to have the same order in every stacked bar. I used the code data1 <- read.table("N_O_W_MAI.txt", header=TRUE, dec = ",") attach(data1) Teich1<-factor(Teich,levels=c(5,7,9,11,"G") ,ordered=is.ordered(Teich))
2011 Oct 09
3
ANOVA from imported data has only 1 degree of freedom
Hi, I'm trying to analyse some data I have imported into R from a .csv file but when I carry out the aov command the results show only one degree of freedom when there should be 14. Does anyone know why? I'd really appreciate some help, the data is pasted below. /The imported table looks ike this this:/ Order Transect Sample Abundance 1 Coleoptera 1 1 13 2
2008 May 21
1
split character string in matrix into character vector and numeric vector
Hello, I've got a matrix consisting of one column with n rows. Each field in the matrix is filled with a character vector. I would like to convert this matrix into a character vector containing the B03_MAH-type entries from the beginning of each row and a data.frame that contains the numeric data, but I am stuck. I have tried to use textConnection with sep = " " but since
2009 Feb 07
3
Re-post data format question (apologies)
Hello all, I have a *.csv file that looks like this (actual file is orders of magnitude larger): Site taxa no.ind forest LMA 1 forest LCY 1 forest SCO 1 meadow LMA 2 meadow LCY 1 meadow PNT
2009 Apr 06
3
how to subsample all possible combinations of n species taken 1:n at a time?
Hello I apologise for the length of this entry but please bear with me. In short: I need a way of subsampling communities from all possible communities of n taxa taken 1:n at a time without having to calculate all possible combinations (because this gives me a memory error - using combn() or expand.grid() at least). Does anyone know of a function? Or can you help me edit the combn or
2010 Feb 05
2
number of Excel worksheets
Dear All, I would like to count or list the names of the existing worksheets within an .xls file. Any hints? Thaks, Gabor -- Pozsgai G?bor www.coleoptera.hu www.photogabor.com
2006 May 10
1
ape comparative analysis query
I've been comparing variables among objects (taxa) related by known trees, using phylogentically independent contrasts in the ape package, and want to move on to more complex models e.g. by using gls with appropriate correlation terms. My trees contain lots of (hard) polytomies and information about ancestors, which I've been including- creating fully dichotomous trees by using zero branch
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
2011 Apr 06
1
Creating a symmetric contingency table from two vectors with different length of levels in R
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] "Amoebozoa"
2008 Aug 26
1
processing subset lists and then plot(density())
d <- structure(list(Site = structure(c(8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L, 8L, 12L, 7L, 6L, 11L, 5L, 10L, 4L, 3L, 2L, 1L, 9L,
2010 Aug 05
2
try-error within for loop
Dear all, I run a loop wrapped in try(), and for each of the rows where "try-error" is true I want to fill that row with NA (at the moment it is omitted). So I would expect to get a dataframe with 1000 rows some of which would be empty, but instead I get a dataframe with 995 rows. In this case missing 5 rows were omitted. Any suggestions? Thanks, Olga ----------------
2012 Nov 14
2
error data frame
Hallo everybody! I am trying to perform a TiTAN (Baker & King 2010) analysis with R 2.14.1. I have come that far: h89Abund <- read.csv("Fish89Abund.csv") > names (Fish89Abund) [1] "StationCode" "Abramisbrama" "Alburnoidesbipunctatus" "Alburnusalburnus" [5] "Ameiurusmelas" >
2010 Apr 29
2
Rotating Titles
Hi All, I am looking for help in rotating species titles produced using the strat.plot( ) function in the rioja package. This function produces a stratigraphic plot of paleoenvironmental data. Currently the titles of each species are plotted vertically while they are typically plotted at a 45 degree angle in other programs. Does anyone have any idea of how to rotates these titles? Below is an
2005 Nov 08
4
writing R shell scripts?
I'm new to the list. I've used R and S-PLUS a bit for about 15 years but am now working to make R my main program for all numerical and statistical computing. I also use Octave for this kind of work and I recommend it (it is also under the GPL). Here's my question: In Octave I can write shell scripts in the Linux/UNIX environment that begin with a line like this...
2003 Sep 02
1
normal distribution
Hi Sirs and Madams. My question is more statistical than related with the use of R software and I hope it will not seems so silly and elemental. I'm analyzing a set of data of some soil organism collected in diferent landscapes, soils taxa, and depths. The sample was performed thinking in a factorial structure with four factors: Specie, Landscape, Soil and Depth. Because not all the
2008 Nov 20
1
Calculate an equation
Dear all, I was wondering if you could help me with the following. I want to do calculate this equation: Ps(t)= (?_(r=1)^N Xtr* 1/?drs)/(?_(r=1)^N 1/?drs) Ps(t) ? Probability that taxon t will occur at site s (300 sites s) N ? Number of sites = from 1 to 49 Xtr ? Value for taxon t at site r (I have this information in a table, 40 taxa (columns) t, 49 sites r) drs ? Distance from site r to
2008 Feb 21
1
Permutation Test
Dear R users, i am fairly new to R and am having trouble creating code to solve a problem. I've searched the list, combed Crawley's 'R book' and several others, but can't quite find what i want. I want to generate permutations of various 'blocks' of 14 numbers. Each number within a block is a character state for a particular biological taxon. In the example below, for
2010 Oct 07
2
text/mtext axis labels on graphs
Hello everyone I have problem with axis labels on graphs, I have my code as below: plot(0,0,xlim=c(1,ncol(PA)),ylim=c(1,nrow(PA)),main="Stratigraphic Range",xlab="Time Bins",ylab="Taxa",cex.axis=1.5,cex.lab=2,cex.main=2.5,mgp=c(5,1.5,0),xaxt="n") text(1:(length(strat_name)), y= 0, adj=1, srt=45,labels=strat_name,xpd=TRUE, cex=1) #adds text to x
2011 Nov 10
3
Error in matrix, not ordered vectors or numerical value, and SIAR.
Help! model1 <- siarmcmcdirichletv4(data, source, tef, concdep=0, 500000, 50000) Error in matrix(1, ncol = (numsources + numiso) * numgroups, nrow = (siardata$iterations - : invalid 'ncol' value (too large or NA) In addition: Warning message: In Ops.ordered((numsources + numiso), numgroups) : '*' is not meaningful for ordered factors Previous message, but more problems:
2011 Nov 10
4
Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 4L, : max not meaningful for factors
Hello, Beginner, sorry if this is wasting anyone's time, but have been working on this for a couple of days now, think it should have take a few hours! The Problem: Error in Summary.factor(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 4L, : max not meaningful for factors I have tried to re-arrange and check formula. I am working in SIAR, and cannot get model1 to run because of the error