search for: food

Displaying 20 results from an estimated 1079 matches for "food".

Did you mean: foo
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 -------------- An HTML attachment was scrubbed... URL: <http:/...
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)
...able Content-Disposition: attachment; filename="Ereck.txt" COLLNUM NPGRC No LOCALNAME DISTRICT VILLAGE PROVINCE DISEASERESISTANCE = PLANTUSES PARTUSED FARMER V1 V2 V3 V4 V5 V6 V7 V8 V9 V10 V11 V12 V13 = V14 V15 V16 V17 V18 V19 V20 V21 V22 MMB05 1343 Nhongoro Nyanga Samakande Manicaland food "stalk, seed" Mr = Bulawayo 0 1 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 MMB07 1345 Ipwa Nyanga Samakande Manicaland food "stalk, seed" Mr = Bulawayo 0 1 0 0 0 0 0 1 1 0 0 0 1 0 1 0 0 0 0 1 0 1 MMBO8 1346 Ipwa Nyanga Samakande Manicaland food "stalk, seed" Mr = Bulawa...
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,...) t...
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 (...
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
...urs. 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 <- structure(list(Food = structure(c(2L, 1L, 3L, 4L), .Label = c("Bread", "Milk", "Potatoes", "Rice"), class = "factor"), Expense = c(25, 49, 34, 15)), .Names = c("Food", "Expense"), row.names = c(NA, -4L), class = "data.frame") p <- g...
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 Male 4 657 Fresh Female 5 594 Fresh Female 6 677 Fresh Female 7 592 Rancid Male 8 538 Rancid Male 9 476 Rancid Male 10 508 Rancid Female 11 5...
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 food. I tried, x...
2007 Nov 21
1
Help Required in using cast (reshape package) function
...ckage 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 Period variable value "Aaa11 xx" "Latin America" "Mexico" "food & beverages" "2002:FY" "account payable" 10000 "Aaa11 xx" "Latin America" "Mexico" "food & beverages" "2002:FY" "account receivable" 50000 "Aaa11 xx" "Latin America" "Mexi...
2011 May 08
2
Rearranging variables in table in non-alphabetical (manually specified) order
...le:? a <- c("Anna","Anna","Michael","Klaus","Klaus","Anna","Fritz")? b <- c("Schnitzel","Pommes","Pommes","Schnitzel","Wurst","Schnitzel","Schnitzel")? food <- matrix(c(a,b),7) as.data.frame(food) -> tmp? as.data.frame(table(tmp)) -> X levelplot(X$Freq ~ X$V1 * X$V2,xlab="people",ylab="food")? Food is now ordered: Pommes, Schnitzel, Wurst. But I need: Schnitzel, Pommes, Wurst.? How can I define the order? I'm happy ab...
2012 Feb 29
1
ggplot2 dot chart-start at zero
...s doing. So far, I see that scale_x_continuous(expand=c(0,0)) removes the space on the right and left. but I don't understand how to just get the left only to disappear. Any help would be appreciated Code below #======================================== library(ggplot2) xx<- structure(list(Food = c("Milk", "Bread", "Potatoes", "Rice"), Expense = c(25L, 49L, 34L, 15L)), .Names = c("Food", "Expense" ), class = "data.frame", row.names = c(NA, -4L)) p <- ggplot(xx, aes(Expense, Food)) pa <- p + geom_point(aes(...
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 =...
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 3 3 When I do 'd...
2005 Mar 11
1
reading in data problems
...ocial group 1 61 26. Land possessed CODE 2 62 - 63 27. Dwelling code 1 64 28. Type dwelling 1 65 29. Type structure 1 66 30. Covered area 6 67 - 72 31. Cook 2 73 - 74 32. Light 1 75 33. Meal taken outside 1 76 34. Ceremony performed 1 77 35. Pds purchase 1 78 36. Get food 1 79 37. Not get food in the month of Jan 2 80 - 81 38. Not get food in the month of Feb 2 82 - 83 39. Not get food in the month of Mar 2 84 - 85 40. Not get food in the month of Apr 2 86 - 87 41. Not get food in the month of May 2 88 - 89 42. Not get food in the month of June 2 90 - 91 43. Not...
2010 Jul 12
2
Question about food sampling analysis
Greetings to all, and my apologies for a question 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...
2011 Sep 03
1
help with glmm.admb
...B 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 name of the grouping variable (also when "random" is missing) Here is what I have tried so far (along with some similar variations): model_nb<-glmm.admb(data$total_bites_rounded~age_class_back+(1|...
2006 Jun 24
1
Parsing XML with REXML problem
...OCTYPE newsfeed SYSTEM "http://www.healthday.com/newsfeed.dtd">^M <newsfeed> <article id="533276" posting_date="21-Jun-2006" archive_date="14-Jun-2007">^M<news_type>FYI</news_type>^M <headline><![CDATA[Health Tip: Eaten Bad Food?]]></headline>^M <blurb><![CDATA[Signs and symptoms of food poisoning ]]></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 p...