similar to: Calculate percent occurrence of different values

Displaying 20 results from an estimated 40000 matches similar to: "Calculate percent occurrence of different values"

2011 Jan 14
9
Selecting the first occurrence of a value after an occurrence of a different value
Hello everyone, I am currently working with some data where I need to select the first occurrence of a value after the occurrence of another value. The data has two columns, one with a time and one with occurence of certain events. The column of data I want to select from looks like this (and each of these events have a corresponding time in another column). Stat71 OutMag FirstResp InMag
2009 May 23
2
counting occurrence of text in a dataframe
Hello list. I am hoping for some help with a relatively simple problem. I have a data frame arranged as below. I want to be able to count the occurrence of each gene (eg let-7e) by Experiment. In other words how many times does a given gene crop up in the dataframe. I tried table but couldn't work out how to get the output I want. I have also considered rearranging this data into a list (by
2012 Jun 21
2
How to calculate values with percent sign imported from Excel?
Hi R list, I imported values from Excel, there is a column with numbers like 45%, 65%, 12%. I want to find its mean. What should I use? strisplit() split() parse() Data from dput(), structure(c(78L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L), .Label = c("", "-0.15%", "-0.34%", "-1.3%", "-10.77%", "-100.00%", "-11.45%",
2012 Jun 08
2
Percent of a given subset
How would I find the Percent of FuelTypeNum within the Band given AvailableMW? example: type 1 is 1% of PB0 type 2 is 54% of PB0 type 4 is 4% of PB0 type 5 is 42% of PB0 Note: the Bands and fuel types are not always constant. Data: FuelTypeNum Bands AvailableMW AvailableMWNewFormat 1 PB0 185319 185.319 2 PB0 18352000 18352 4 PB0 1338785 1338.785 5 PB0 14189756 14189.756 2 PB1
2005 Mar 22
1
List of tables rather than an extra dimension in the table or (l)apply(xtabs)
I'm not sure how to best explain what I am after but here goes. I have a data frame with 2 geographical factors. One is the major region the other is the component regions. I am trying to process all the regions at the same time without using "for". So I need (think, I do) a list of matrices each structured according to the number of subregions within each region. So is there a
2011 Jan 25
1
subsetting based on joint values of critera
Dear colleagues, I have a dataset that looks as below. I would like to make a new dataset that excludes the cases which are joint conjunctions of particular state names and years, so Connecticut and 2010, Maryland and 2010 and Vermont and 2010. I'm trying the following subset code: newdata<- subset(bpa, (!State=="Connecticut" & year<"2010")) It appears that
2005 Jun 28
2
function for cumulative occurrence of elements
Hello, I have a data set with 9700 records, and 7 parameters. The data were collected for a survey of forest communities. Sample plots (1009) and species (139) are included in this data set. I need to determine how species are accumulated as new plots are considered. Basically, I want to develop a species area curve. I've included the first 20 records from the data set. Point
2008 Aug 07
2
List of "occurrence" matrices
R users, I don't know if I can make myself clear but I'll give it a try. I have a data.frame like this x <- "var1,var2,var3,var4 a,b,b,a b,b,c,b c,a,a,a a,b,c,c b,a,c,a c,c,b,b a,c,a,b b,c,a,c c,a,b,c" DF <- read.table(textConnection(x), header=T, sep=",") DF and I would like to sum all the combinations/occurences by a factor (letter in this case) between
2010 Mar 02
2
Creating matrix from long table in database (pivoting)
Hi all, I have a table in database that is very long and when simplified it has only two columns in it (id, text). id is the row, and text is the column. Technically the text is a term and and id is the document. If simplifying this and assuming there is only one occurrence of the term per the document. I shall be able to convert this into a binary matrix. Table looks like this... *ID** **Text*
2005 Aug 11
4
booting on a dos software
Hi! I've got a USB key with several tools (small linux, memtest86+) booting via syslinux. But now I have to add powermax.exe (a MSDOS tool to test Maxtor disks) on this key. As I've always been on Unix/Linux system, I don't know what to do to run powermax.exe from syslinux. I've made a boot floppy disk and tried to copy everything on my usb key and put the command.com in kernel
2012 Jan 24
2
Null models of species co-occurrence
I am currently testing species co-occurrence patterns using null models and the oecosimu() function within the vegan() package. My issue is that none of the methods appear to be the ones that I want. The methods listed are r0, r1, r2, r2dtable, swap, tswap. However, I want to know how to go about implementing fixed row algorithms, as suggested in Gotelli 2000 in Ecology. Also, the null models
2013 Feb 06
2
Omitting repeated occurrence in a string
Hello again, I was looking for some way on How to delete repeated appearance in a String. Let say I have following string: Text <- "ahsgdvasgAbcabcsdahj" Here you see "Abc" appears twice. But I want to keep only 1 occurrence. Therefore I need that: Text_result <- "ahsgdvasgAbcsdahj" (i.e. the first one). Can somebody help me if it is possible using some R
2017 Sep 12
2
comparition of occurrence of multiple variables between two dataframes
Hi everyone, I need your help to solve a problem with occurrence and two dataframes. I have an excel table of 15200 lines. Each line correspond to a tree analyzed for its structures. I have all the structures in columns (48 structures). The occurrence of these structures has been counted on every tree. For example, the tree 12607 has 3 structures CV11, 1 structure IN12 and none (0) of the rest of
2003 Jul 15
2
Keeping track of occurrence of warning message
Hi there, I am interested if there is anyway to keep track of the occurrence of warning message. I know that warnings will only be printed out at the end of the program if warn=0. However I am also interested at which particular set of data does the warnings occur too. This is because I am running 1000 data, so if there are 2 or 3 data that give warnings, I would like to know which are the ones
2005 Jan 24
1
mcnemar.test odds ratios, CI, etc.
Does anyone know of another version of the Mcnemar test that provides: 1. Odds Ratios 2. 95% Confidence intervals of the Odds Ratios 3. Sample probability 4. 95% Confidence intervals of the sample probability Obviously the Odds Ratios and Sample probabilities are easy to calculate from the contingency table, but I would appreciate any help on how to calculate the confidence
2006 Oct 22
2
cross tabs with percents?
-- apologies if this is a dup - i got a bounce saying the message was unprocessed. Is there a straightforward way to get a table with percents in the cells rather than counts? I've looked at table, ftable, xtabs, and ctab, which did the conversion but returned the results in a single row without labels. any suggestions are appreciated. thank you.
2011 Feb 21
3
Species accumulation curves with differential sampling effort
Hello! I'm a PhD student working with coral reef fish diversity in Mexico. I want to do species accumulation curves but I have differential sampling effort for each "sample". Do you know or have developed an R script that consider the differential effort of each sample? PRIMER and other programs use each pack of species as a replica without the possibility of telling the program that
2008 Sep 23
2
Counting character occurrences in data frame
Hi R-Users, I have a data frame containing year, month, day, and code columns. The code column is a unique character of set ('E','A','B') - I am trying to determine an efficient way of summarizing the count of each of these codes by month and year without having to use for...loops and subsets. Does anyone have any suggestions? Thanks in advance, Dave Here is a snapshot
2009 Aug 31
4
Offtopic, HT vs. HH in coin flips
Dear R-help, Could someone please try to explain this paradox to me? What is more likely to show up first in a string of coin tosses, "Heads then Tails", or "Heads then Heads"? ##generate 2500 strings of random coin flips ht <- replicate(2500, paste(sample(c("H", "T"), 100, replace = TRUE), collapse =
2009 Jun 19
1
Alternate ways of finding number of occurrence of an element in a vector.
Hi, I have a vector "v" and would like to find the number of occurrence of element "x" in the same. Is there a way other than, sum(as.integer(v==x)) or length(which(x==v)) to do the this. I have a huge file to process and do this. Both the above described methods are pretty slow while dealing with a large vector. Please have your comments. Praveen