Displaying 20 results from an estimated 2986 matches for "cars".
Did you mean:
card
2011 Aug 09
1
"Denormalize" data
Hello R users,
My problem is that the data I've got is in the minimum number of columns
with each ward (geographic area) appearing multiple times. The first 30
terms look like this
> HHum02
CASW Btype Yr CO2Group NumVeh
170597 00CCFA CARS 2002 C 2
170598 00CCFA CARS 2002 D 2
170599 00CCFA CARS 2002 E 22
170600 00CCFA CARS 2002 F 32
170601 00CCFA CARS 2002 G 32
170602 00CCFA CARS 2002 H 12
170603 00CCFA CARS 2002 I 12
170604 00CCFA CARS 2002...
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)
)
carm...
2011 Jun 06
1
Merge two columns of a data frame
I have the following data:
prefix <- c("cheap", "budget")
roots <- c("car insurance", "auto insurance")
suffix <- c("quote", "quotes")
prefix2 <- c("cheap", "budget")
roots2 <- c("car insurance", "auto insurance")
roots3 <- c("car insurance", "auto
2011 Dec 17
1
Binning a 2 column matrix by avarages of rows.
Newbie here. Many apologies in advance for using the incorrect lingo.
I'm new to statistics and VERY new to R.
I have a "nx2" matrix , I want to sort the values based on the average of 2
columns and put k lowest (or highest) values in bin1, second k high/low
values in bin2, and so on (bins would be of the same dimensions). I should
also know what the first index (or position) of
Problem with non-ascii characters in forms: "incompatible character encodings: UTF-8 and ASCII-8BIT"
2010 Aug 01
3
Problem with non-ascii characters in forms: "incompatible character encodings: UTF-8 and ASCII-8BIT"
...8 and Rails 2.3.8.
I was creating a minimal application to test handling of Norwegian special
characters when I bumped into this strange problem...
I have a simple Car model with fields maker:string and model:string.
For the controller I planned to just have an index action do all the work:
class CarsController < ApplicationController
def index
if request.post?
@car = Car.new(params[:car])
@car.save
end
@cars = Car.find(:all)
end
# def create
# @car = Car.new(params[:car])
# @car.save
# redirect_to :action => :index
# end
end
The corresponding view l...
2006 Apr 08
5
Creating sub actions
...irtain UI.
[The background]
Now let say I have a object "Car". Apart from having basic attributes
like car name, model, etc etc, tt has a list of "parts" that a car has.
This essentially means i have two models (or tables in db) "Car" and
"Part" and "Cars_Controller" and "Parts_COntroller".
[The Problem]
Now I want to develop an edit interface for this scenario. The edit
interface has two tabs "General Car Details" and "Car Parts".
Now I understand that when I select to "edit" a car. This will take me...
2013 Jan 16
1
Declaring/importing non-exported functions [car] in another package
A new function in my heplots package wants to use a non-exported utility
function in the car package,
df.terms, but this depends on other non-exported functions.
From the Writing R extensions manual, I thought I could do this via (in
my NAMESPACE)
importFrom(car, car:::df.terms, car:::df.terms.default, car:::is.aliased)
but I get:
** preparing package for lazy loading
Error : objects
2016 Aug 28
2
Problemas para delimitar chunks con la fucnción spin en el paquete knitr
Estimados miembros de la lista,
Estoy trabajando con la función spin del paquete knitr y no puedo entender
por que a pesar de usar #+ para iniciar cada chunk no reconoce el inicio de
un nuevo chunk al menos que incluya texto entre cada inicio de chunk. En
el ejemplo abajo
#+
data(cars)
#+
cars
No los separa como 2 chunks diferentes
Ejemplo de mi archivo en r (prueba.R)
---------------------------------------------------------
#' Traer datos
#+
data(cars)
#+
cars
#' Gráfico
#+
plot(cars$speed, cars$dist)
-----------------------------------------------------------...
2003 Jan 03
1
Take care with codes()! (was type of representation)
...I have some data that i want to plot but i don't find how to
> > > do it. I have car
> > > types (bmw,renault,mercedes,seat ...), colors and a number
> > > for each car
> > > type-color relation.I want to come up with a matrix
> > > representation of cars vs
> > > colors where in each intersection i could set a dot
> > > proportional in size to my
> > > third variable.
> > >
> > >
> > > Can anybody give me a clue of hoe to come up with such
> representation.
> > >
> > > Than...
2006 Nov 04
1
layere dispatching - please help!
...aving trouble with setting up web services with layered
dispatching.
I''ve defined my controller (backend_controller.rb) as:
class BackendController < ApplicationController
web_service_dispatching_mode :layered
web_service_scaffold :invoke
web_service (:car) {CarService.new}
end
and my service (node_service.rb) as:
class CarApi < ActionWebService::API::Base
api_method :find_all_cars,
:returns => [[:int]]
api_method :find_car_by_id,
:expects => [:int],
:returns => [Car]
api_method :find_car...
2002 Jan 02
1
No subject
Any rpart user:
I am trying to construct an rpart tree using a subset of the data and it
will occasionally fail when predicting a categorical response variable.
The reason that rpart fails is that the subset does not contain each of the
categories present in the original data. For example, in the car.test.frame
example, a subset that has all the categories except "Small" will not
2012 Jul 07
2
How to intall "car" package on linux
I got this error when I tried to install the package in order to use the
"logit"(logit transformation) function on linux.
> install.packages(car)
Error in install.packages(car) : object 'car' not found
I was using the Terminal in my macbook accessing the server in the lab. I
could successfully using library(car) to install this package use R.app GUI
in my laptop, after
2007 May 14
0
building and saving has_many and has_one relations
...t, in this case, for:
Car.new("student_id" => student.id, attributes_of_car)
which does it assign the car to the student. Is that simply a bug in
the docs?
And now comes has_many, which is where the real confusion begins. Take
the same scenario, but now a student can own one or more cars:
class Student
has_many(:cars)
end
class Car
belongs_to(:student)
validates_presence_of(:student_id)
end
When I do
student = Student.new(attributes_of_student)
student.cars.build(attributes_of_car1)
student.cars.build(attributes_of_car2)
Until now, everything is fine, except that the car...
2006 Jul 03
9
checkboxes
in the mean time i am using a checkbox like this :
<input type="checkbox" name="var[car]" <%= var.car ? ''checked'' : ''''
unless @var == nil %> />
but i am sure there is something better than this in rails like
<%= checkbox_tag ''var'', ''car'', :checked => true %>
but this is not
2003 Jun 12
2
car package dependencies
Hello,
I tried to install the "car" package but I can't solve the dependencies. car
needs grid, lattice and dr but when I try to install grid I get this error
prompt:
wz3x64:/home/oggi/R/software/contrib # rpm -i R-car-1.0.R3-1.i386.rpm
error: failed dependencies:
R-grid is needed by R-car-1.0.R3-1
R-lattice is needed by R-car-1.0.R3-1
2010 Aug 21
1
Speed improvement to evalList
I've been inspired to look at the R source code by some strange timing
results that I wrote about on my blog at radfordneal.wordpress.com
(see the posts on "Speeding up parentheses..." and "Two surprising
things...".
I discovered that the strange speed advantage of curly brackets over
parentheses is partially explained by an inefficiency in the evalList
and
2009 Jun 11
2
Expand a contingency table based on the value in one column
Hi R-helpers,
I have the following (dummy) dataframe:
> test
DATE LOCATION KIND CLASS COUNT
1 1 1 CAR A 2
2 1 1 TRUCK D 3
3 1 1 BUS E 4
4 1 2 CAR E 2
5 1 2 TRUCK A 7
6 1 2 BUS F 1
That I would like to turn into this:
> test2
DATE LOCATION KIND CLASS
1 1 1
2003 Mar 08
0
RE: Text Rotation (was: Take care with codes()!)
...nd how to
> > >>>>do it. I have car
> > >>>>types (bmw,renault,mercedes,seat ...), colors and a number
> > >>>>for each car
> > >>>>type-color relation.I want to come up with a matrix
> > >>>>representation of cars vs
> > >>>>colors where in each intersection i could set a dot
> > >>>>proportional in size to my
> > >>>>third variable.
> > >>>>
> > >>>>
> > >>>>Can anybody give me a clue of hoe to come u...
2016 Aug 29
2
Problemas para delimitar chunks con la fucnción spin en el paquete knitr
...t;
escribió:
> Hola,
>
> ¿Qué versión estás usando de knitr?.
>
>
> He probado spin() sobre este script:
> https://github.com/yihui/knitr/blob/master/inst/examples/knitr-spin.R
>
> Y ha funcionado perfectamente.
>
> En el script he incluido tus líneas de "data(cars)" y "cars" y tanto en el
> html y como en el .md los chunks salen separados....
>
> La versión que tengo instalada de knitr es la 1.14.
>
> Saludos,
> Carlos Ortega
> www.qualityexcellence.es
>
>
>
> El 28 de agosto de 2016, 16:16, Manuel Spínola <...
2008 Jul 08
4
Conditional "link_to" helper function - AYUDAME POR FAVOR
...ent_user.id == owner_id # current user is owner
5. "#{link_to anchor_text, where_to_go}"
6. else
7. anchor
8. end
9. end
And here''s how I call it in the view...
1. <%= link_to_if_owned(@car.owner_id, "Add Gas", ":controller =>
:cars, :action => :add_gas, :car_id => @car.id")%>
The downside is that the actual HTML rendered is a bad link (this is
what I get)...
1. <a href=":controller => :cars, :action => :add_gas, :car_id =>
@car.id">Add Gas</a>
How can I make it so the link wo...