similar to: get top n rows group by a column from a dataframe

Displaying 20 results from an estimated 100 matches similar to: "get top n rows group by a column from a dataframe"

2012 Jun 01
3
Add rank column to data frame as in SQL...
Hopefully this is an easy problem... I'm trying to add a partitioned rank column to a data frame where the rank is calculated separately across a partition by categories, the way you could easily do in SQL. I found this solution in the archives that looked like it might work: http://tolstoy.newcastle.edu.au/R/e11/help/10/09/8675.html The example has a data frame with several car companies,
2017 Dec 17
4
Auto Data in the ISLR Package
myAuto <- Auto[ grep("ford|toyota",Auto$name),] On Sat, Dec 16, 2017 at 10:28 PM, Bert Gunter <bgunter.4567 at gmail.com> wrote: > I did not care to load the packages -- small reproducible examples are > preferable, as the posting guide suggests. > > But, if I have understood correctly: > > See, e.g. ?subset > > Alternatively, you can read up on
2017 Dec 17
0
Auto Data in the ISLR Package
Dear Eric: Thank you very much. It works nicely. *Just one more thing;* how to create a new variable (say, *Make*) with *Make = Ford* for the ford brand and *Make = T**oyota* for the toyota brand. Once again thank you all. abou ______________________ *AbouEl-Makarim Aboueissa, PhD* *Professor of Statistics* *Department of Mathematics and Statistics* *University of Southern Maine* On
2017 Dec 17
1
Auto Data in the ISLR Package
myAuto <- Auto[ grep("ford|toyota",Auto$name),] myAuto$Make <- NA myAuto$Make[grep("ford",myAuto$name)] <- "Ford" myAuto$Make[grep("toyota",myAuto$name)] <- "Toyota" Regards, Eric On Sun, Dec 17, 2017 at 11:58 AM, AbouEl-Makarim Aboueissa < abouelmakarim1962 at gmail.com> wrote: > Dear Eric: > > Thank you very much.
2007 Aug 16
3
Getting distinct result lists
Is there a way in Ferret to do something akin to SQL''s "SELECT DISTINCT" query? I have a table with multiple columns, and I would like to search just a couple of them (but index others for other kinds of searches on the table). The two columns I want to search do not have unique values, because the other columns finish specifying the record. Is there a way to avoid picking up
2001 Nov 28
4
password sync problem
Hi! I'm a newbie on this. This system had been setup by a guy before me. Doing a testparm gives me one of these messages: ---cut---- ERROR: the 'unix password sync' parameter is set and the 'passwd program' (/bin/ passwd) cannot be executed (error was No such file or directory). ---cut--- This might be the reason why I get logs such as this: ............ Nov 25 10:26:58 server
2008 Mar 09
1
Two sample t-test
Hi, I want to perform t-test in R for each individual car. Here is what i have. Is there a way i can test each car? The original table (test.csv) Car Tester2 Tester2 Controller1 Controller2 Audi 0.56 0.9 0.5 0.9 Toyota 0.2 0.9 0.9 0.2 Honda 0.5 0.9 0.1 0.5 BMW 0.2 0.3 0.5 0.7 > cars<-read.table("c://test.csv",header=T,sep=",", + skip=2,comment.char="")
2017 Dec 16
2
Auto Data in the ISLR Package
Dear All: I would like to create a subset data set *with only* all Ford and all Toyota cars from the Auto data set in ISLR R Package. Thank you very much in advance. Please use the following code to see how is the data look like. install.packages("ISLR") library(ISLR) data(Auto) head(Auto) with many thanks abou ______________________ *AbouEl-Makarim Aboueissa, PhD* *Professor
2003 Dec 30
4
Assignments in loops
Greetings all. Any help with the following would be appreciated. I want to create a data frame for each file in a directory. The following code does not work but it may show what I am trying to do: carmakes <- c('BMW','Chrysler','Citroen','Fiat','Ford','Holden','Honda',
2017 Dec 17
0
Auto Data in the ISLR Package
That probably works in this case, but it would cause grief if another car make had "ford" somewhere inside its name e.g. "bedford". Safer general practice is Auto[Auto$name %in% c("ford", "toyota"),] or similar using subset(). -pd > On 17 Dec 2017, at 09:10 , Eric Berger <ericjberger at gmail.com> wrote: > > myAuto <- Auto[
2017 Jul 05
2
Svyglm Error
Greetings, I am revisiting code from several different files I have saved from the past and all used to run flawlessly; now when I run any of the svyglm related functions, I am coming up with an error: Error in model.frame.default(formula = F3ATTAINB ~ F1PARED, data = data, : the ... list does not contain 4 elements The following is a minimal reproducible example: library(RCurl)
2017 Dec 16
0
Auto Data in the ISLR Package
I did not care to load the packages -- small reproducible examples are preferable, as the posting guide suggests. But, if I have understood correctly: See, e.g. ?subset Alternatively, you can read up on indexing data frames in any good basic R tutorial. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." --
2011 May 21
1
'apply' with additional class variable
Dear R gurus, I'm trying to solve what I assume is a fairly simple problem, but I'm having trouble finding the proper approach. I have a matrix where each column is some object (e.g. a car) and each row is a numeric measurement of a feature of said object (e.g. horse power, top speed, etc.). Let's also suppose that I know what make the car is (e.g. toyota, ford, etc.), stored in a
2017 Jul 05
0
Svyglm Error
hi, i am not hitting an error when i copy and paste your code into a fresh console. maybe compare your sessionInfo() to mine? > sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack 1 Matrix products: default locale: [1] LC_COLLATE=English_United States.1252
2008 Jun 16
3
rspec license plate
I was driving to my parents'' house this weekend and saw this in their neighborhood: http://bakineggs.com/rspec1.jpg Whoever owns this car is awesome in my book. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20080616/87d5a4a7/attachment-0001.html>
2004 Jun 05
1
Winbind to more than one Domain [HELP]
Dear all, Anybody can help me ? I want my samba box to be able to join two different domain and authenticate to those different domains using Winbind. Thank's. Regards, herman > -----Original Message----- > From: Herman (ISTD) [mailto:herman_ang@toyota.co.id] > Sent: 04 Juni 2004 16:41 > To: samba@lists.samba.org > Subject: [Samba] Winbind to more than one Domain > >
2010 Aug 13
1
Samba - GID on files created in a directory
I recently upgraded to Samba 3.0.37 (not the most current but when running 2.0.x it was a big step.) However I now have an issue I just can't seem to fix, being entirely possible I stared at it for a week without seeing it. The old version used to inherent the GID from the parent directory. I can honestly say I have no idea how I configured that to work but it was seven years ago and
2006 May 25
1
is possible to use update with lmer models
Hi, the question on subject is possible? example: m1 <- lmer(y~1+(1|subject)) m2 <- update(m1,.~.+x) I try but dont work, exist any other method for this? Thanks Ronaldo -- He won a Toyota now, eh? -- pal?ndromo -- |> // | \\ [***********************************] | ( ? ? ) [Prof. Ronaldo Reis J?nior ] |> V [UNIMONTES/Depto. Biologia
2008 Jun 24
1
Bar charts with error bars
I would like to add error bars to a bar chart, I have created in R. I am able to add error bars to a bar plot, but the same method does not seem to work for my bar chart version.   Is there a way to add error bars to bar charts? ________________________________________________________ Audi, Fiat, Peugeot, Skoda, Porsche, Toyota, Ford - Kelkoo har brugte biler til en hver smag! Klik her
2006 May 12
3
monitoring sangoma cards via snmp
Hello, Digium does not provide snmp support to monitor their cards ! Anybody has tried Sangoma product A104 Quad T1/E1 or others ? Regards harry ___________________________________________________________________________ Yahoo! Mail r?invente le mail ! D?couvrez le nouveau Yahoo! Mail et son interface r?volutionnaire. http://fr.mail.yahoo.com