search for: car

Displaying 20 results from an estimated 2951 matches for "car".

Did you mean: char
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) ) car...
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 insurance") suf...
2011 Dec 17
1
Binning a 2 column matrix by avarages of rows.
...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 the pair has been. car-1 29 30 car-2 22 24 car-3 16 16 car-4 41 41 car-5 43 45 car-6 34 36 for exmample in bins of 2x2 bin1 car-3 16 16 car-2 22 24 bin2 car-1 29 30 car-6 34 35 bin3 car-4 41 41 car-5 43 45 -- View this message in context: http://r.789695.n4.nabble.com/Binning-a-2-column-matrix-by-avarages-of-rows-tp42...
2010 Aug 01
3
Problem with non-ascii characters in forms: "incompatible character encodings: UTF-8 and ASCII-8BIT"
Hi First off, I''m using Ruby 1.9.1p378 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 #...
2006 Apr 08
5
Creating sub actions
...kind of stuck in a situation. I understand that for every model there is a controller class. This controller class has cirtain set of methods where each method defines cirtain action to be performed. And each of this action renders cirtain 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 Prob...
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)
Ahh yes, sorry about that. Here's the corrected snippet: # Create an Example Data Frame Containing Car x Color data carnames <- c("bmw","renault","mercedes","seat") carcolors <- c("red","white","silver","green") datavals <- round(rnorm(16, mean=10, sd=4),1) data <- data.frame(Car=rep(carnames,4),...
2006 Nov 04
1
layere dispatching - please help!
...39;m having 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 :f...
2002 Jan 02
1
No subject
...ny 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 produce an rpart tree. I attempted to use "parms=list(prior=...) and it did not correct the problem. Here is a demonstration of the problem using the car.test.frame: library(rpart) data(car.test.frame...
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 loading MASS package. > library(MASS) > library(car) Ca...
2007 May 14
0
building and saving has_many and has_one relations
...d about an aspect of has_one and has_many relations, with regard to using the build method, and saving the belongs_to side. It''s a somewhat long post. so please bear with me :) First let''s consider the has_one scenario. Let''s say I have a student who must own exactly one car: class Student has_one(:car) end class Car belongs_to(:student) validates_presence_of(:student_id) end When I do student = Student.new(attributes_of_student) car = student.build_car(attributes_of_car) The car is created, and I can do: student.save! car.save! I don''t understand...
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 working any...
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-latt...
2010 Aug 21
1
Speed improvement to evalList
...ed to evalArgs and hence to here. */ SEXP attribute_hidden evalList(SEXP el, SEXP rho, SEXP call, int n) { SEXP head, tail, ev, h; int mode; /* mode==0 is 0 args, mode==1 is 1 arg, mode==2 is >1 arg */ head = R_NilValue; mode = 0; while (el != R_NilValue) { n++; if (CAR(el) == R_DotsSymbol) { /* If we have a ... symbol, we look to see what it is bound to. * If its binding is Null (i.e. zero length) * we just ignore it and return the cdr with all its expressions evaluated; * if it is bound to a ... list of promises, * we force all the p...
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 CAR A 2 1...
2003 Mar 08
0
RE: Text Rotation (was: Take care with codes()!)
...ovides an enhanced 'balloonplot' function with 'rowsrt', 'colsrt' arguments to control rotation of the labels, and 'rowmar', 'colmar' to control the amount of space reserved for the labels. Here's an example: # Create an Example Data Frame Containing Car x Color data, with long car names carnames <- c("BMW: High End, German", "Renault: Medium End, French", "Mercedes: High End, German", "Seat: Imaginary, Unknown Producer") carcolors <- c("red","wh...
2016 Aug 29
2
Problemas para delimitar chunks con la fucnción spin en el paquete knitr
Muchas gracias Carlos. Tengo la versión de knitr 1.14 Corrí el ejemplo que me dices y resulta en lo mismo, no se crean chunks diferentes. Parece que para separar chunks se debe incluir #' Por ejemplo, estas 2 líneas de códigos del ejemplo: #+ test-chisq5 sum(x^2) # chi-square distribution with df 5 #+ test-c...
2008 Jul 08
4
Conditional "link_to" helper function - AYUDAME POR FAVOR
...if_owned(owner_id, anchor_text, where_to_go) 4. if current_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...