similar to: Is there a quick way to count the number of times each element in a vector appears?

Displaying 20 results from an estimated 10000 matches similar to: "Is there a quick way to count the number of times each element in a vector appears?"

2013 Feb 05
2
How to subset a data frame to include only first events
Hi there, I have data frame with columns ID and Date. There are multiple rows for each ID, but I only want to keep the *first* such row--i.e., the row corresponding to the earliest event. So if I had, say, 1000 rows of 100 IDs doing an average of ten events each, I'd run this trimming procedure and end up with a data frame containing 100 rows (one for each ID), where each row record that
2008 Sep 05
1
Trouble with R CMD check: I can't seem to get dependencies right (maybe I'm using R_LIBS incorrectly?)
Hi there, I'm in the following directory: ~/Documents/Rstuff/diceFiles/dice_1.1 The directory "dice" is in this directory, with all the usual build files (DESCRIPTION, NAMESPACE, etc). I'm trying to run the following command: R CMD check dice (where "dice" is the name of the package I'm checking), and I get the following: * checking package dependencies ...
2007 Jul 18
1
Is there a facility in R similar to MatLab "syms" that allows using unevaluated numeric symbols in matrices?
Hi, I'm trying to use R to get eigenvalues and eigenvectors of a matrix whose elements are of the form (2 * lambda), -(lambda + mu), etc. I'd like R to treat this matrix as a numeric matrix without treating lambda and mu as variable names but rather as some sort of atomic quantities (and hence give eigenvectors in terms of mu and/or lambda). MatLab and Mathematica both do this,
2006 Feb 09
2
Polymorphic Associations
If anybody on edge familiar with this could help, that would be "great" :) I have different types of things I want to be "reviewable". So, instead of having a slew of HABTM... this new Polymorphic Associations schtick seemed like the best solution. I have everything setup as I thought it should be (so I think)... but it doesn''t appear to be working correctly. Here
2015 Jun 18
2
[LLVMdev] Contributing a buildbot for the BPF backend
Thank you. Alexei just committed the change to SVN. Regards, Marco Leogrande Sent by a carbon-based life form; hence, it may contain repetitions, inaccuracies, logical fallacies and repetitions. On Wed, Jun 17, 2015 at 2:52 PM, Galina Kistanova <gkistanova at gmail.com> wrote: > LGTM. > Please commit. > > Thanks > > Galina > > On Tue, Jun 16, 2015 at 8:32 PM,
2015 Jun 17
2
[LLVMdev] Contributing a buildbot for the BPF backend
Galina, thanks again for your help. I have cooked a new patch that should make a bit more sense. I have added the new builder under _get_experimental_scheduled_builders(), as the comment above that function suggested me it would be a good idea. :) Does it look a reasonable start? Regards, Marco Leogrande Sent by a carbon-based life form; hence, it may contain repetitions, inaccuracies,
2010 Apr 27
2
Curve Fitting/Regression with Multiple Observations
I recently came to realize the true power of R for statistical analysis -- mainly for post-processing of data from large-scale simulations -- and have been converting many of existing Python(SciPy) scripts to those based on R and/or Perl. In the middle of this conversion, I revisited the problem of curve fitting for simulation data with multiple observations resulting from repetitions. In the
2006 Apr 25
5
Heteroskedasticity in Tobit models
Hello, I've had no luck finding an R package that has the ability to estimate a Tobit model allowing for heteroskedasticity (multiplicative, for example). Am I missing something in survReg? Is there another package that I'm unaware of? Is there an add-on package that will test for heteroskedasticity? Thanks for your help. Cheers, Alan Spearot -- Alan Spearot Department of Economics
2009 Feb 02
4
New to R
Hello All, A colleague of mine started working with R and out of curiosity I did some research on the language. Very nice. In my opinion this is one of the best languages I've found for getting tasks I'm interested in done. I wrote this simple die roller and was curious to know if it is R enough. ############################################################################## #
2008 Aug 15
2
Combination with repetition
Hi there! I can't find any information about creating combinations with repetitions in R. The function combn() does create combinations, but _without_ repetitions. Here is what I need to do: svIter <- 1000 xx <- matrix(rnorm(m*n), c(m, n)) sequence <- seq(range(xx)[1], range(xx)[2], length.out = svIter^(1/q)) expand.grid(secuence, secuence, .../q times/..., secuence) That is,
2007 Mar 06
1
The plot of qqmath
Hello, I would like to inlude the Q-Q plot by "qqmath" into a panel with other plots, say, using par(mfrow=c(1,2)). How can this be done given that "qqmath" refreshes the plotting window and there seems to be no series coming out of it? Thanks Serguei [[alternative HTML version deleted]]
2007 Mar 07
2
No years() function?
Hi, I'm trying to aggregate date values using the aggregate function. For example: aggregate(data,by=list(weekdays(LM),months(LM)),FUN=length) I would also like to aggregate by year but there seems to be no years() function. Should there be one? Is there any alternative choice? Also, a hours() function would be great. Any tip on this? Thanks in advance! S?rgio Nunes
2006 Jan 27
17
Multiple Model Validation
Hey All ! I have a form which contains two models. I would like both models to be validated, but have their validations aggregated on the page. If I do: <%= error_messages_for(:model1) %> <%= error_messages_for(:model2) %> It puts two big validation blocks on the page. I would like all the errors from both models, but only in one validation box. Is this possible ? All my attempts
2015 Jun 10
2
[LLVMdev] Contributing a buildbot for the BPF backend
Hello Marco, Welcome aboard! slaves.py keeps the build slaves definitions, builders.py keeps the builders definitions. You have to have both. The steps of adding a new slave is here: http://llvm.org/docs/HowToAddABuilder.html. Please make sure you done the step # 10 before bringing your slave up, otherwise it wouldn't be authorized by the master and will be blacklisted after multiple
2004 Jun 01
2
Problem in random (lme)
In a lattice 11x11 with 6 repetitions, we want to compare lines to their two parents. 3 of the 6 repetitions are sprinkled and the 3 others not. There are 5 factors : hm (hydrous mode), variety, block, rep and grandrep. grandrep gathers two repetition, a sprinkled and a not (as in Split Plot !). I use lme but I have problems in random. Can someone help me ? Ibnou DIENG
2006 Mar 16
4
problems with latest and greatest ?
I just did the following: 1) checked out latest rails from svn. 2) built project using the /bin/rails with the latest rails binary. 3) did a "rake freeze_edge" within the project Now, script/server is failing =========================== ./script/../config/../vendor/rails/railties/lib/commands/../tasks/tmp.rake:1: undefined method `namespace'' for #<Object:0x401ce970>
2015 May 08
2
[LLVMdev] Contributing a buildbot for the BPF backend
Hi everyone, I am working with Alexei Starovoitov to contribute an LLVM buildbot for the experimental BPF backend. I am following the steps at [1] to setup a buildbot and I was mostly successful: I was able to setup a slave and a temporary master to check its base config. Now I'm not sure about the next step: patching the "slaves.py" and "builders.py" files in zorg. * Is
2011 Nov 18
3
Apply functions along "layers" of a data matrix
Hello How can I apply functions along "layers" of a data matrix? Example: daf <- data.frame( 'id' = rep(1:5, 3), matrix(1:60, nrow=15, dimnames=list( NULL, paste('v', 1:4, sep='') )), rep = rep(1:3, each=5) ) The data frame "daf" contains 3 repetitions/layers (rep) of 4 variables of 5 persons (id). For some reason, I want to calculate
2006 Feb 22
15
Fixtures and Relationships
In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but
2007 Oct 08
5
Dice simulation: Getting rep to re-evaluate sample()?
I'm trying to get R to simulate the sum of the values on 10 fair dice (yes, it's related to a homework problem, but is not the problem itself). I tried to do this: > rep(sum(sample(1:6,100,replace=T)), times=10) [1] 341 341 341 341 341 341 341 341 341 341 and noticed that sum(sample()) seems to be only evaluated once. How can I overcome this, so that I get a vector of values that