search for: qty

Displaying 20 results from an estimated 125 matches for "qty".

Did you mean: pty
2006 Jul 13
8
can''t convert true into integer
I have a method: ? def reduceProuctInventoryBy(product_id, reduction) ? ? t=Product.find(:first, :conditions =>["id = ?", product_id]) ? ? t.qty=(t.qty-reduction) ? ? t.save ? end and the model: class Product < ActiveRecord::Base ? validates_presence_of :qty, :specialDescription ? validates_numericality_of :qty end but when i run my method, I get this: "can''t convert true into Integer" and rails does not give me a...
2011 May 27
1
Unable to Plot using headers.
...ot my data on an x/y scatter. My data is a 2 column 8000 row table (saved as .txt file) imported into R. >demand=read.delim("C:\\Documents and Settings\\E066582\\My Documents\\R\\R-2.13.0\\bin\\demand.txt") First rows with headers are as shown: > demand[1,] Date Qty 1 12/31/2006 1 With two columns Date/Qty. I attempted to plot and received an error. My headers were not found as an object in R...maybe I'm missing something, but I was under the impression I didn't need to create each header as an object... > plot(Qty, Date) Error in plot(Qty...
2012 Dec 03
1
qr.qy and qr.qty give an error message when y is integer and LAPACK=TRUE
With this example set.seed(123) A <- matrix(runif(40), nrow = 8) y <- 1:nrow(A) A.laqr <- qr(A, LAPACK=TRUE) both qr.qy(A.laqr,y) and qr.qty(A.laqr,y) give the respective error messages Error in qr.qy(A.laqr, y) : 'b' must be a numeric matrix Error in qr.qty(A.laqr, y) : 'b' must be a numeric matrix However when Lapack is not used as in A.liqr <- qr(A, LAPACK=FALSE) qr.qy(A.liqr,y) and qr.qty(A.liqr,y) don't...
2007 May 15
2
QR Decompositon and qr.qty
Dear R people, I do not have much knowledge about linear algebra but currently I need to understand what the function qr.qty is actually doing. The documentation states that it calculates t(Q) %*% y via a previously performed QR matrix decomposition. In order to do that, I tried following basic example: m<-matrix(c(1,0,0,0,1,0,0,0,1,0,0,1),ncol=3) # 4x3 matrix qr.qty(qr(m),matrix(c(1,2,3,4,2,3,4,5,1,1,1,1,2,2,2,2)...
2001 Mar 22
1
lazy evaluation and DUP=F
I am having some difficulty understanding the implication of lazy evaluation mixed with DUP=F in a .Fortran call. In qr.qty from base DUP is not used as an argument so defaults to T. I am calling qr.qty with a very large array and would like to set DUP=F in the .Fortran call so that qr.qty would be defined as copied below. Is there some risk that a variable used as the argument in the original calling environment would...
2009 May 27
4
Sale, pop and product
...oducts, each one has a quantity and discount associated. So each sale has_many :products through => pops And each product has_many :sales through => pops For example: +-------------------------------------------+ |--> Sale 1 <--> Pop 1 <--> Product 1 | | qty = 20 | | disc= 0.1 | | <--> Pop 2 <--> Product 2 | | qty = 10 | | disc=0 | +-------------------------------------------+ |--> Sale 2 <--> Pop 3...
2004 Jan 30
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with suggested (PR#6510)
....labels") ## remove backticks from simple labels for strata (only) nmstrata <- sub("^`(.*)`$", "\\1", nmstrata) if(intercept) nmstrata <- c("(Intercept)", nmstrata) qr.e <- er.fit$qr rank.e <- er.fit$rank qty <- er.fit$resid maov <- is.matrix(qty) asgn.e <- er.fit$assign[qr.e$piv[1:rank.e]] ## we want this to label the rows of qtx, not cols of x. nobs <- NROW(qty) if(nobs > rank.e) { ## APPARENT BUG 1: # result <- vector("list&quot...
2011 May 27
1
FW: FW: Unable to Plot using headers (converting to Numeric)
I tried command as.numeric(Qty) #converting column"Qty" in object "demand" to numeric. However it remains a non-numeric value. What is the best way to convert a column of data to a numeric value in R? What is the best way to convert dates into a numeric format (or some format able to be used in an x,y sc...
2004 Feb 02
0
Two apparent bugs in aov(y~ *** -1 + Error(***)), with (PR#6520)
...remove backticks from simple labels for strata (only) > nmstrata <- sub("^`(.*)`$", "\\1", nmstrata) > if(intercept) nmstrata <- c("(Intercept)", nmstrata) > qr.e <- er.fit$qr > rank.e <- er.fit$rank > qty <- er.fit$resid > maov <- is.matrix(qty) > asgn.e <- er.fit$assign[qr.e$piv[1:rank.e]] > ## we want this to label the rows of qtx, not cols of x. > nobs <- NROW(qty) > if(nobs > rank.e) { > ## APPARENT BUG 1: > #...
2002 May 30
0
se.contrast: matrix contrast.obj doesn't work as documented (PR#1613)
...page for se.contrast, when describing the contrast.obj parameter, states that "Multiple contrasts should be specified by a matrix as returned by contrasts." When doing an unbalanced single factor ANOVA, using a contrast.obj as returned by contrasts results in the following error from qr.qty when se.contrast is called: Error in qr.qty(object$qr, contrast) : qr and y must have the same number of rows In fact, the matrix contrast.obj parameter that se.contrast requires is not a contrast matrix as returned by contrasts. It is a matrix each of whose columns is in the same form as the vec...
2006 Apr 07
3
RJS removing content of div, but not div itself
...oller ---------------------- class ListdemoController < ApplicationController def index session[:toggle_color] = 1 # used to create a ''green-bar paper'' effect end def add_item @ingredient = Ingredient.new @ingredient.name = params[:name] @ingredient.qty = params[:qty] @ingredient.save render(:partial => ''line_form'') end def delete Ingredient.find(params[:id]).destroy render(:partial => ''remove_line_form'' ) end end -------------------- index.rhtml -----------------------------...
2011 May 27
1
FW: Unable to Plot using headers.
...9;stephen's mailinglist account' Subject: RE: [R] Unable to Plot using headers. Thanks for the input. Despite both graphing directly and with "attach" I am still getting a screwed up graphical output as well as an error. My table is object "demand" w/ columns Date and Qty Plot(demand$Qty, demand$Date) Attach(demand) Plot(Qty, Date) Both of these commands produce something completely different (and quite odd) from a simple xy scatter. X-axis should be "date" and Y-axis should be "Qty". The table "demand" was imported into R sorted by...
2006 Jan 10
1
Can somebody explain when to reload an ActiveRecord
Hi all, I''ve the following test method in my controller_test which increment the ''qty'' attribute in a has_many association, ''sa_report_products''. The ''item_count'' method returns the sum of all qty''s in ''sa_report_products'': def test_add_product_to_report sa_rpt = SaReport.find(1) assert_equal 3, c =...
2012 Aug 20
1
function case in sqldf (datas from oracle) with a null value
I use sqldf to join 2 dataframes from 2 distinct databases : a and b come from old sqldf's. sqldf("select a.*, b.*, case a.QTY when null then b.QTY else a.QTY end as NEW_QTY" from a inner join b on a.OBJECT=b.OBJECT") R doesn't understand "when null". I tried with "when NA", "when '' ", "when ' ' " but it doesn't work. -- View this message in co...
2006 Apr 20
5
strange mysql problem
...nd in the console: >>l = LineItem.create ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , )'' at line 1: INSERT INTO line_items (`qty`, `quote_id`, `price`, `lead_time`, `part_number`) VALUES(, , , , ) why is it doing that? all my other models that belong_to something work.
2010 Jun 23
2
Analyzing large transition matrix
Let's say you have a dataframe of car trade-ins. For example, each row contains oldcar newcar qty and a typical entry could be lexus bmw 1 I put the qty column to allow for fleet purchases, where one purchase may convert multiple cars at once. I'd like to show what's going on. I could do a histogram of newcar to show the frequency each type of car is bought. If there are 5-10...
2005 Dec 20
1
nls problem
Hi list, I tried to use nls to do some nonlinear least square fitting on my data with 340 observations and 10 variables, but as I called nls() function, I got this error message: Error in qr.qty(QR, resid) : 'qr' and 'y' must have the same number of rows Then I traced back a little bit into nls() function, the error seemed to happen when calling nlsiter() internal function, but I did not find any clue calling qr.qty() function in nls.c. I searched around mailing list, the...
2004 Mar 01
0
se.contrast ....too hard??? .... Too easy????? .....too trivial???? ...... Too boring.....too????????
...e 10 61.885 6.189 Error: Within Df Sum Sq Mean Sq F value Pr(>F) Residuals 180 318.56 1.77 > > table(ddata$shp) reserve strip 96 96 > > se.contrast(repmod2, list(shp=="strip", shp=="reserve"),data=ddata) Error in qr.qty(strata$qr, scontrast) : qr and y must have the same number of rows > ????????????????????? Thanks, Duncan ...............and here is what debug says:- > debug("qr.qty") > se.contrast(repmod2, list(shp=="strip", shp=="reserve"),data=ddata) debugging in: q...
2011 Apr 18
1
how to update data
...t. i want to update the database using that string. how can i do that? There would be a multipal object in this string. sample string is: [{"product":{"amt":300,"created_at":"2011-03-28T05:46:52Z","id":1,"prodnm":"maruti","qty":1,"rate":12,"updated_at":"2011-03-28T05:46:52Z"}},{"product":{"amt":2000,"created_at":"2011-04-18T09:02:45Z","id":2,"prodnm":"lux","qty":2,"rate":12,"updated_at":&...
2005 Dec 14
9
Passing quantity in a shopping cart
I am using this line on my index.rhtml page to capture the quantity required of a particular item for a basic shopping cart app: <%= text_field ''line_item'', ''quantity'', {:size=>3} %> </td> but my next screen (a cart screen) doesn''t reflect what was entered in that text field when the item is added to the cart. That is,