Displaying 20 results from an estimated 10292 matches for "school".
2006 Aug 16
6
read.csv issue
I'm trying to read in some data from a .csv format and have come across
the following issue. Here is a simple example for replication
# A sample .csv format
schid,sch_name
331-802-7081,School One
464-551-7357,School Two
388-517-7627,School Three \& Four
388-517-4394,School Five
Note the third line includes the \ character. However, when I read the
data in I get
> read.csv(file.choose())
schid sch_name
1 331-802-7081 School One
2 464-551-7357...
2004 Nov 29
1
Labeling charts within a loop
Hi All:
This may turn out to be very simply, but I can't seem to add the name of
the school to a chart. The loop I created is below that subsets a
dataframe and creates a chart for each school based on certain
variables. As it stands now, they title includes the school's ID number.
Instead, I want to replace this with the school's actual name, which is
stored in a variable called...
2006 Apr 20
4
Question about Associations
Hi all. Got a stupid-simple question about associations. I have two
models - school and course. There are a fixed number of schools (set
up in the migration). Each course is assigned a school and a school
will be associated with multiple courses...
How do I set up the associations? Do (can) I have School :has_one
:course and Course :has_many :schools?
Does the schools table the...
2005 Aug 25
1
question about custom contrasts in ANOVA
Hi,
I have a problem in which I have test score data on students from a number
of schools. In each school I have a measure of whether or not they
received special programming. I am interested in the interaction between
school and attendance to the programming, but in a very select set of
comparisons. I'd like to cast the test as one in which students in each
school who atten...
2006 Jul 31
2
Updating a belongs_to foreign key leaves the old association object available
Perhaps this is intentional, but it seems unlikely:
class Person < ActiveRecord::Base
belongs_to :school
end
p = Person.find(:first)
p.school # nil
p.school_id = School.find_by_name(''High School'').id
p.school.name # High School
p.school_id = School.find_by_name(''Primary School'').id
p.school.name # High School <= Shouldn''t this be Primary School?
p.schoo...
2008 Apr 10
3
Custom Form Builder Help
...I wanted to
use facebooker''s typeahead widget in side the other form builder.
I don''t know much about form builders, but I created a file in lib/
doing this:
http://pastie.caboo.se/178776
It works great, except that the id''s and class names get messed up.
Instead of school_name, I get nilClass_name.
The other methods work fine however.
Here''s the form:
<h1>New School</h1>
<%= show_flash %>
<% af_form_for :school, :url => schools_path, :html => {:method
=> :post } do |f| %>
<%= f.typeahead :name, @schools, "name&qu...
2008 Sep 17
1
A Simple Question
Hi:
I am trying to run your SCHOOLS example as following and I get an error message stated that : Error: could not find function "bugs"
Would you please help me since I would like to run some WINBUG programs from your R by reading external data and I am new to R?
Do I missing some function? Should I install some extra fil...
2006 May 25
10
One set of source code with multiple instances
Hi there, we made a PHP and Impakt2 based web content management system
for schools with specific features that work really well for schools.
The way I designed it was so there was one central set of source code
and an empty (in terms of rows in tables) database structure. To set up
a new school i had a script that basically created a new directory in
/var/www and then within...
2009 Feb 09
3
rendering original view
def create
# next statement is original and is removed
# @review = Review.new(params[:review])
@school = School.find(params[:school_id])
# @review = @school.reviews.create!(params[:review])
@review = @school.reviews.build(params[:review])
respond_to do |format|
if @review.save
flash[:notice] = ''Review was successfully created.''
# format.html { r...
2006 Jun 03
8
confused about ActiveRecord relationships
I am very confused about where to put the belongs_to and the has_one
(and other relationship identifiers). I have read the RDoc and the
agile book many times about this and I think i still see it backwards.
Let me outline my app so you have an understanding...
I have 2 tables:
Schools { id, school_name, address_id }
and
Addresses { street1, street2, city, state, zip, country }
*** this is the way that makes sense to me but it doesnt work ******
Models
school.rb
has_one :address
address.rb
belongs_to :school
View for School
<% for school in @schools %>
<...
2011 Jan 13
1
Openbugs and rbugs on mac with wine
Hello list,
I?ve been trying to get OpenBUGS running on my mac using the wine
emulator. I can run Openbugs just fine by doing:
wine ~/OpenBUGS312/OpenBUGS.exe
In the terminal, so OpenBUGS works. When I try to run the schools
example using rbugs(), the OpenBUGS process starts in wine, but it
just sits there, no log, no script, no output of any sort. The rbugs
() call makes the init, data, model and script file, but there seems
to be a problem with R piping the script to OpenBUGS, here is my example
library(rbu...
2008 Jan 31
1
R2WinBUGS is broken
Dear R-users,
I am trying to use the following code to reproduce results from Prof.
Gelman's book, but have the listed error for R2WinBUGS version (the openbugs
version is good). I am using R-2.6.1 on windows XP, and all the R packages
are most current ones. schools.bug can be found at
http://www.stat.columbia.edu/~gelman/bugsR/runningbugs.html . Can anyone
help me to figure out what's going wrong?
rm(list=ls())
library(R2WinBUGS)
library ('BRugs')
setwd('C:/bayesian/bda/codes/example_5_5')
data(schools)
J <- nrow(schools)
y <- sch...
2004 Nov 17
1
"Impossible to run" error message when using Sweave
Dear List:
I have a large dataset of multiple schools. My goal is to produce a
separate tex file for each school that plots some of the student
achievement scores. Essentially, the aim is to develop a custom report
for each school. To accomplish this, I have code for a loop that gets
sourced into R and then Sweaves the multiple files to create the
in...
2005 May 16
1
A question about bugs.R: functions for running WinBUGs from R
...nBUGs from R that is
writen by Dr. Andrew Gelman who is a professor from Columbia University.
The bugs.R would be very useful for me, and I think many of you know it
as well. I followed the instuctions on Dr. Gelman's web to install all
of documents that bugs.R needs, but when I try to run the school example
the web posted in R, I got an error.
Would you please help me out? I am stuck on this for a while and really
frustrated now.
The program and the error as follow.
Thanks a lot in advance!
Jiaa
________________________________________________________________________
_
> # R code f...
2008 Apr 07
5
Associations errors
undefined method `each'' for 0:Fixnum
at line
@school = School.find_by_title(params[:school_id].gsub(''-'', " "))
for team in @school.teams
........
end
@school does exist cause i tried with .find(:first) and it gave the
same error.
Also I''m getting
undefined method `reject'' for #<Game:0x24ca1c4>...
2008 Nov 02
2
Merging nested files
Greetings all,
I have three files that I would like to merge. The first is a student
level file that contains the student ID, their school ID, and their
country ID.
The second is the school file that contains the school ID and country ID.
The third is the country file with a country ID.
I would like to merge the three together using the common country ID.
Of course, what this would mean is that school data be repeated for
every...
2006 Feb 10
1
Lmer with weights
...ot;meta" analysis. I wonder if weights
argument is the right one to use to include uncertainty (standard
errors) of "data" into the model. I would like to use lmer(), since I
would like to have a "freedom" in modeling, if this is at all possible.
For example we can take schools data by Gelman from R2WinBUGS package.
As you can see bellow use of weights argument did not had influence on
results.
I do not know if my specification of weights i.e. 1 / sd^2 is ok. Under
least squares one minimizes sum(e^2_i) or sum(w_i * e^2_i) with weighted
LS. If I consider that \sigma...
2008 Dec 14
2
custom REST action - template question
Hallo phorum,
i have custom rest action.
routes.rb:
map.resources :schools, :collection => { :graduations => :get }
SchoolsController:
def graduations
@schools = School.graduation(true)
end
link somewhere in navigation:
<%= link_to ''Schools with graduation'', graduations_schools_path %>
All works OK for me, but Rails needs (of course) a...
2010 Jul 15
3
Creating Enumerated Variables
Hi,
I am trying to create a variable counting the number of individuals based on
two variables. I am able to do it or one variable, but not two. In SAS I was
able to sort by two variables and use a first. statement to create the
counts based on both. Here is an example:
What I have
ID Age School Grade
1 10 1 98
2 10 2 97
3 10 1 92
4 11 1 90
5 11 1 80
6 11 2 70
7 10 1 80
8 10 1 79
9 11 2 70
What I need
ID Age School Grade School Count
1 10 1 98 1
3 10 1 92 2
7 10 1 80 3
8 10 1 79 4
2 10 2 97 1
4 11 1 90 1
5 11 1 80 2
6 11 2 7...
2015 Jul 13
2
Crear datos aleatorios con restriciones
...lid
60 e1 g1 c1 e1 g1 c2 Valid
indica que un maestro tiene asignado c1 y c2 en la escuela e1 y el grado
g1. Correcto? Si es asi, esto es casi lo que queira producir y creo que
puedo llegar a donde quiero usando tu codigo de base.
El objecto que yo quiero generar es el que genero en stakoverflow
`schoolGrade`. Donde
> schoolGrade[1:2,] grade School.ID Classroom Teacher.ID Teacher.exp Teacher.Other Teacher.RE
1 3 Modi School A Sage, Kendell 27.87402
0 -0.04372723
2 4 Modi School A Delgado, Vanessa 26.20701
0 -0.88280564
Es decir, cada observación es...