search for: foods

Displaying 20 results from an estimated 1071 matches for "foods".

Did you mean: goods
2011 May 27
14
[rails] undefined method `model_name' for NilClass:Class
Never seen the error above before, code: describe "edit action" do it "edit action should render edit template" do food = Food.create(:name=>''mooo'') # Food.any_instance.stubs(:valid?).returns(true) get :edit, :id => food.id response.should render_template(:edit) end end -------------- next part
2006 Feb 24
1
Help a n00b?
So I''m trying to do that hot new thing with AJAXy forms: http://idiet.toasterwaffles.com/foods/list Here''s the relevant code in list.rhtml (for the form portion) <tbody> <%= render_collection_of_partials "list_stripes", @foods %> </tbody> <tfoot> <tr id="addFood"><%= form_remote_tag( :html => {''id'...
2003 Aug 04
1
hclust() and agnes() method="average" divergence (PR#3648)
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C35A53.75780090 Content-Type: text/plain; charset="iso-8859-1" Anyone have a clue why hclust() and agnes() produce different results in the example below when both use method="average"?? I'm not able to reproduce
2012 Apr 18
3
how to plot separate lm ablines on the same xyplot by group
Hi, I am trying to use xyplot to plot the relationship between size and day (y~x) by a food factor that has two levels, low and high. I have 3 reps per factor/day. I want the plots from each food treatment on the same axiss, so I used this code: xyplot(Size ~ Day, groups = Food, data = louis.data.means,col=1, pch=c(1,17), panel=function(x,y,groups,...){ panel.superpose(x,y,groups,...)
2009 Aug 16
5
Plot(x,y)
Hi , I am using the plot function for some data , and the plot is coming back pure black , with scales on the side . Regards Malcolm [[alternative HTML version deleted]]
2006 May 20
5
Can lmer() fit a multilevel model embedded in a regression?
I would like to fit a hierarchical regression model from Witte et al. (1994; see reference below). It's a logistic regression of a health outcome on quntities of food intake; the linear predictor has the form, X*beta + W*gamma, where X is a matrix of consumption of 82 foods (i.e., the rows of X represent people in the study, the columns represent different foods, and X_ij is the amount of food j eaten by person i); and W is a matrix of some other predictors (sex, age, ...). The second stage of the model is a regression of X on some food-level predictors. Is it p...
2006 Apr 06
4
Record retrieval in Many-to-many using :through not working
Hello, I get an error while retrieving records from the following model structure. Tables foods - id, food foodallergies - food_id, symptom_id, a few other columns symptoms - id, symptom Models class Food < ActiveRecord::Base has_many :foodallergies has_many :symptoms, :through => :foodallergies end class Symptom < ActiveRecord::Base has_many :foodallergies has_many :foods,...
2009 Aug 10
2
ggplot: colours to geom_segments
Just as an exercise I am tying to add colours to a geom_segment command. I can get one colour but not a sequence of colours. Can anyone suggest how I can get the green lines in the plot below to be different colours? I thought I could use a palatte of colours but that did not seem to work. Thanks ========================================================================= library(ggplot2) xx
2007 Mar 08
1
how to assign fixed factor in lm
Hi there, > Value=c(709,679,699,657,594,677,592,538,476,508,505,539) > Lard=rep(c("Fresh","Rancid"),each=6) > Gender=rep(c("Male","Male","Male","Female","Female","Female"),2) > Food=data.frame(Value,Lard,Gender) > Food Value Lard Gender 1 709 Fresh Male 2 679 Fresh Male 3 699 Fresh
2011 Feb 18
2
xyplot formula
df=data.frame(country=c("A","A","A","B","B","B"), food=rep(c("Apples","Pears","Bananas"),2), X2000=c(4,5,6,7,6,8), X2001=c(4,5,6,7,6,8), X2002=c(4,5,6,7,6,8), X2003=c(4,5,6,7,6,8)); I have data in the above form trying to get a plot of each fruit over time year conditioned on country and
2007 Nov 21
1
Help Required in using cast (reshape package) function
Hello everyone, I am new to R. I have data in the form of excel pivot table format and I want to cast it into a format which can make it compatible with computation. Since I already have the package in pivot format; I avoid melt function and use the cast directly. I inspect the dataread <- read.csv(".....", header=TRUE) Data in the format Id Region Country Industry
2011 May 08
2
Rearranging variables in table in non-alphabetical (manually specified) order
Dear all, I'm trying to rearrange variables in a table in a custum order for using it with levelplot. So far I could only find examples showing how to sort alphabetically. Here is a short example:? a <- c("Anna","Anna","Michael","Klaus","Klaus","Anna","Fritz")? b <-
2012 Feb 29
1
ggplot2 dot chart-start at zero
I am trying to create a simple dot-plot in ggplot2 with a solid line from the y-axis to the dot, something I first saw in Cleveland's 1984 book What I would like is to have the graph start at zero on the x-axis but leave some space on the right side of the plot area. I assumed that I should be able to do this with expand() in scale_x_continuous() but either I'm wrong or just don't
2013 Jan 16
1
Mean calculation by two variables
Hello All, I have a data frame (dput information below) with food item weight for fish species. I need to calculate the Mean proportion by weight of each food item for each specie, as show in solution data frame (dput information below). I use the ddply function (plyr package) in two steps. First calculate the proportion of weight for each individual: step1 = ddply (example, .(ID), transform,
2006 Apr 04
4
Help with many-to-many using :through
I am using many-to-many using :through since I need to store additional information in the join table. I am doing this and it seems to work. I want to verify that this is the best way to do this. Tables foods - id, food foodallergies - food_id, symptom_id, a few other columns symptoms - id, symptom Models class Food < ActiveRecord::Base has_many :foodallergies has_many :symptoms, :through => :foodallergies end class Symptom < ActiveRecord::Base has_many :foodallergies has_many :foods,...
2008 Apr 23
3
select rows from data based on a vector of char strings
Hi, I have loaded a dataset in R : data = label freq1 freq2 news 54 35 fun 37 21 milk 19 7 food 3 3 .... etc And I have a vector flist<-c("fun","food") Now I want to use the vector 'flist' for selecting these values from 'data' so that I get the following dataset : label freq1 freq2 fun 37 21 food
2005 Mar 11
1
reading in data problems
Hi I have a dataset (.txt file and .dat file) in which the length of one record is 144. There is no header in the .txt or .dat file itself. When I read this file using the read.table command, and want to drop some coloumns by setting the argument colClasses to "NULL" for the columns that I want to drop, it does not work, because the entire record of the length 144 is being treated as
2010 Jul 12
2
Question about food sampling analysis
...estion that is mostly about statistics and secondarily about R. I have just started a new job that (this week, apparently) requires statistical knowledge beyond my training (as an epidemiologist). The problem: - We have 57 food production facilities in three categories - Samples of 4-6 different foods were tested for listeria at each facility - I need to describe the presence of listeria in food (1) overall and (2) by facility category. I know that samples within each facility cannot be treated as independent, so I need an approach that accounts for (1) clustering within facilities and (2) the...
2011 Sep 03
1
help with glmm.admb
R glmmADMB question I am trying to use glmm.admb (the latest alpha version from the R forge website 0.6.4) to model my count data that is overdispersed using a negative binomial family but keep getting the following error message: Error in glmm.admb(data$total_bites_rounded ~ age_class_back, random = ~food.dif.id, : Argument "group" must be a character string specifying the
2006 Jun 24
1
Parsing XML with REXML problem
...isoning ]]></blurb>^M <byline><![CDATA[]]></byline>^M <body><![CDATA[<p> (HealthDay News) -- Food poisoning often occurs after eating a meal in a large, social setting like a picnic, cookout or cafeteria. According to the U.S. National Library of Medicine, foods in these settings are often prepared early and can be left unrefrigerated for long periods, allowing bacteria to form on the food.</p> <p>Food poisoning symptoms typically begin within two to six hours after eating contaminated food. Signs of food poisoning are most often vomiting, fev...