similar to: Remove duplicates from a data frame but with some special requirements

Displaying 20 results from an estimated 1400 matches similar to: "Remove duplicates from a data frame but with some special requirements"

2018 Mar 15
3
stats 'dist' euclidean distance calculation
Hello, I am working with a matrix of multilocus genotypes for ~180 individual snail samples, with substantial missing data. I am trying to calculate the pairwise genetic distance between individuals using the stats package 'dist' function, using euclidean distance. I took a subset of this dataset (3 samples x 3 loci) to test how euclidean distance is calculated: 3x3 subset used
2011 Jan 04
3
Writing do and resample functions
Hi, I'm trying to take a function from a workspace download provided in a stats textbook book, so I have it in my workspace to use all the time. I opened the workspace and typed the names of the two functions to get the code that makes them up: ------------------------------------------------------------------------------------- > resample function(d, size,
2006 Jan 30
1
weights argument in the lmer function in lme4
I suspect the weights argument is not having any effect. Package: Matrix Version: 0.995-2 Date: 2006-01-19 Beginning with this: Browse[1]> resp.lmer <- lmer(SensSSC ~ Block + Season + (1 | Plot) + (1 | Ma) + (1 | Pa) + + (1 | MaPa), weights = SensSSC.N, data = xx) I group the output into a table with my ran.eff function and get this:
2009 Dec 24
2
Column naming issues using read.table
Hi, this is my first post so please be gentle. I quite new to R and using it for my biology degree. My problem is. Im trying to import data from a .csv file using the read.table command. The .csv file header starts on row 2 but is contained in column 1, i have 600 data files and for future ease would rather not edit each file seperatly. The data starts on row three and I only need the first 381
2008 Dec 02
3
sampling from data.frame
Hi all, I have a data frame with "clustered" rows as follows: Cu1 x1 y1 z1 ... Cu1 x2 y2 z2 ... Cu1 x3 y3 z3 ... # end of first cluster Cu1 Cu2 x4 y4 z4 ... Cu2 x5 y5 z5 Cu2 ... # end of second cluster Cu2 Cu3 ... ... "cluster"-size is 3 in the example above (rows making up a cluster are always consecutive). Is there any faster way to sample n clusters (with
2005 Jan 21
2
cross validation
How to select training data set and test data set from the original data for performing cross-validation --------------------------------- [[alternative HTML version deleted]]
2011 Jan 04
1
Resampling to find Confidence intervals
Hi, I'm doing some modelling (lm) for my 3rd year dissertation and I want to do some resampling, especially as I'm working with microbes, getting them to evolve resistance to antimicrobial compounds, and after each exposure I'm measuring the minimum concentration required to kill them (which I'm expecting to rise over time, or exposures), I have 5 lineages per cleaner, and
2011 Sep 13
3
sox: Failed reading obd-demo.mp3: Do not understand format type: mp3
Hi, Can someone please comment about the below issue [root at host0040 kaushal]# file obd-demo.mp3 obd-demo.mp3: MPEG ADTS, layer III, v1, 256 kBits, 44.1 kHz, Monaural [root at host0040 kaushal]# sox obd-demo.mp3 -e stat sox: Failed reading obd-demo.mp3: Do not understand format type: mp3 [root at host0040 kaushal]# sox -V obd-demo.mp3 -r 8000 -c 1 -t ul -w vm-intro.ulaw sox: Failed reading
2009 Sep 17
2
Voice Playback cutting first word or so of audio file
When I call inbound with a cell phone (via SIP PSTN trunk) some of my prompts the first word is cut off. I'm assuming the prompt is needing to be transcoded on the fly and it's not getting transcoded fast enough. I did a file convert to create gsm versions (currently they are referenced in my dial plan with no extension Seem to have same problem. How do I determine which file
2011 Mar 17
3
Beginner question: How to replace part of a filename in read.csv?
I would like to use samp as a part of a filename that I can change. My source files are .csv files with date as the file name, and I would like to be able to type in the date (later perhaps automate this using list.files) and then read the csv and write the pdf automatically. I have tried different combinations with "" and () around samp, but I keep getting the error "object
2011 Sep 06
2
Generalizing call to function
Hello guys, I would like to ask for help to understand what is going on in "func2". My plan is to generalize "func1", so that are expected same results in "func2" as in "func1". Executing "func1" returns... 0.25 with absolute error < 8.4e-05 But for "func2" I get... Error in dpois(1, 0.1, 23.3065168689948, 0.000429064542600244,
2012 Sep 20
3
lattice dotplot reorder contiguous levels
my reproducible example test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L), .Label = c("A", "B", "C", "D", "E"), class = "factor"),
2009 Feb 24
2
lmer, estimation of p-values and mcmcsamp
(To the list moderator: I just subscribed to the list. Apologies for not having done so longer before trying to post.) Hi all, I am currently using lmer to analyze data from an experiment with a single fixed factor (treatment, 6 levels) and a single random factor (block). I've been trying to follow the online guidance for estimating p-values for parameter estimates on these and other
2000 Feb 24
2
(-1 as index) OR (envelope for QQ)
I'm new to R (and to S) and am wondering about code from pages 72 and 83 of MASS (Venables+Ripley, 3rd edition), to draw an envelope on a QQ plot. Copying from the book, I've got: #... code whose gist is "a.fit <- nls(..." num.points <- length(resid(a.fit)) qqnorm(residuals(a.fit)) # illustrate data-model residuals qqline(residuals(a.fit)) samp <-
2004 Mar 01
6
How to plot Histogram with frequence overlaid by distribution curve
Hi, I am facing the problem that I want to plot a histogram chart set freq to true and overlay with normal or weibull or exponential distribution curve. The sample code is shown as below: >samp<-c(-8.2262,-8.2262,-8.2262,-8.20209,-8.09294,-8.07321,-8.07321, -8.07321,-8.07175,-8.04948,-8.04948,-8.04948,-8.03848,-8.03848,
2007 Feb 12
1
lmer and estimation of p-values: error with mcmcpvalue()
Dear all, I am currently analyzing count data from a hierarchical design, and I?ve tried to follow the suggestions for a correct estimation of p-values as discusssed at R-Wiki (http://wiki.r-project.org/rwiki/doku.php?id=guides:lmer-tests&s=lme%20and%20aov). However, I have the problem that my model only consists of parameters with just 1 d.f. (intercepts, slopes), so that the
2007 Apr 19
0
minor omissions re "special" windows file names (PR#9622)
"lpt1" through "lpt9" and "com1" through "com9" are in fact "special" file names under various versions of Microsoft Windows. However, "R Extensions" says only that "lpt1" through "lpt4" and "com1" through "com3" cannot be used as filenames, and "R CMD check" checks for just these
2007 Mar 12
2
Lmer Mcmc Summary and p values
Dear R users I am trying to obtain p-values for (quasi)poisson lmer models, including Markov-chain Monte Carlo sampling and the command summary. > > My problems is that p values derived from both these methods are totally different. My question is (1) there a bug in my code and > (2) How can I proceed, left with these uncertainties in the estimations of > the p-values? > > Below
2010 Oct 10
1
Query about .check_packages_used_in_examples
G'day all, looking at http://cran.at.r-project.org/web/checks/check_results_Sleuth2.html I noticed that r-prerel-* and r-devel-* issue notes. Apparently, now examples are more thoroughly checked by R CMD check and the note pointed out that a package used in the examples was not declared. This was easily fixed by adding 'Suggests: lattice' to the DESCRIPTION file (now this change has
2017 Nov 12
0
create waveform sawtooth
Ccing the maintainer if the tuneR package. Looks to me like sawtooth (and square) don't behave as expected when using xunit="samples". Workaround is to use xunit="time" instead: sawtooth(110,duration=1/100,samp.rate=sample_rate,xunit="time") I looked at the code but found it to be opaque. -- Sent from my phone. Please excuse my brevity. On November 12, 2017