Displaying 20 results from an estimated 1000 matches similar to: "Add rank column to data frame as in SQL..."
2010 Sep 16
3
get top n rows group by a column from a dataframe
Hi, is there an R function like sql's TOP key word?
I have a dataframe that has 3 columns: company, person, salary
How do I get top 5 highest paid person for each company, and if I have
fewer than 5 people for a company, just return all of them?
Thanks,
Richard
[[alternative HTML version deleted]]
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.
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
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
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[
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 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 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."
--
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="")
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
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)
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
>
>
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
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
2011 Mar 18
4
Performance Difference? Windows vs. Linux
I'm not trying to start a Windows vs. Linux debate, but I've been
using R on a Windows machine for a while, and was recently wondering
if R's performance would be faster on a Linux machine. And similarly,
if any incremental increase in processing speed would be worth the
time it would take me to migrate my entire system to Linux (including
a database that I access via an R package.)
2009 May 06
2
Print to File Formatting
Hello,
I am writing out to a file and have two quick questions that I can't
seem to track down the correct answers for. Luckily, I *think* they
are both simple enough that someone might be able to point me in the
right direction on them without too much trouble.
Both questions relate to the process below where CompleteFrame is a
data frame containing what I want printed to a file.
filename
2006 Mar 22
3
Parent-Child Tables Help
can someone help me with this
i have a table
cars
(
id int
model_id int
make_id int
color_id int
description text
constraint fk_cars_carmake foreign key(make_id) references
carmakes(id),
constraint fk_cars_carmodel foreign key(model_id) references
carmodels(id),
constraint fk_cars_color foreign key(color_id) references colors(id)
)
carmakes
(
id int
carmake varchar
)
carmodels
(
id
2002 Mar 12
0
Antwort: Password sync problem
same results with our AIX 4.3.3. It seems the samba redirection of stdout
and stdin (which seems to work with most unix platforms) does not work with
AIX. I detected similar problems with redirection from java.
I have created a patch for samba 2.2.2 to directly change the AIX password
(using AIX-routines getuserpw and setuserpw). I think it will also work
with 2.2.3a. Its not yet published on my
2009 Apr 06
0
conflict name of si_code on NetBSD
Hi.
I compiled 1.2.rc2 on NetBSD.
[toyota at sernpidal]% uname -rsm
NetBSD 3.1 i386
[toyota at sernpidal]% ./configure; make
--- snip ---
gcc -DHAVE_CONFIG_H -I. -I../.. -std=gnu99 -g -O2 -Wall -W
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -MT child-wait.o -MD
-MP -MF .deps/child-wait.Tpo -c -o child-wait.o child-wait.c
In