Displaying 17 results from an estimated 17 matches similar to: "vector indexing problem in multilevel data: assigning a specific value to all group members"
2006 Jul 20
3
sort_by with via a parent models child
I am having a problem with ruby''s sort_by function. I want to sort a
list of parent model objects based on the children of the parent models.
Normally you might say sortedList = modelList.sort_by { |model|
model[''someAttribute''] }
What I am tring to do is
sortedList = modelList.sort_by{ |model| model.children.find(:first,
order=>"price desc" ).price}
2012 Apr 03
2
Grouping and/or splitting
I have a dataframe imported from csv file below:
Houseid,Personid,Tripid,taz
1,1,1,4
1,1,2,7
2,1,1,96
2,1,2,4
2,1,3,2
2,2,1,58
There are three groups identified based on the combination of first and
second columns. How do I split this data frame?
I tried
aa <- split(inpfil, inpfil[,1:2])
but it has problems.
Output desired is
aa[1]
Houseid,Personid,Tripid,taz
1,1,1,4
1,1,2,7
aa[2]
2013 Mar 04
3
urgent: question concerning data manipulation
Ein eingebundener Text mit undefiniertem Zeichensatz wurde abgetrennt.
Name: nicht verf?gbar
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20130304/62581e97/attachment.pl>
2006 Feb 21
3
HABTM :insert_sql help
Hi all,
I''m working with a legacy sqlserver db and I''m trying to override the
insert sql in as defined in the HABTM method below(becasue the join
has three primary keys), but I''m getting the error: ''undefined local
variable or method `record'' for Project:Class''
has_and_belongs_to_many :people,
:class => ''Person'',
2006 Feb 23
6
prototype ajax + xml response
Hi,
I am looking for a solution to use ajax.request object.
Return response text will be in xml format and I like to know how to
parse that xml information, so that I can put those info into the "span"
or "div" tags of my html page. Is there any easy way to parse that xml
info using prototype library?
Thanks,
kevin.
--
Posted via http://www.ruby-forum.com/.
2011 Nov 21
1
Weird R's behaviour with a quoted name
Can someone explain why the following happens?
---
:> quote(some.name)
some.name
:> bar <- structure(quote(some.name), class = "foo")
:> quote(some.name)
Error in print(some.name) : object 'some.name' not found
:> bar <- quote(some.name)
:> quote(some.name)
Error in print(some.name) : object 'some.name' not found
:> bar <-
2007 Dec 24
3
Affy Package
Dear R Users,
In the expresso function, which combination of these methods for data pre-processing (when using affymetrix oligo arrays) is the best:
bgcorrect.metod = rma rma2 mas
normalize.method = qspline quantiles loess
pmcorrect.method = pmonly subtractmm mas
summary.method = liwong avgdiff medianpolish mas
There are many options within each method. I would appreciate a hint on the best
2007 Nov 07
7
Help on loop
Hey,
I have got a script that returns a long list of font family names, which
I all want to store in a variable (array). I tried doing this with @f =
font.family also in the for loop below but it only prints the last item
when I want to display the results.
require ''rubygems''
require ''RMagick''
include Magick
for font in Magick.fonts
puts font.family
end
2009 Jun 30
1
beadarray package
Dear R users,
I am using the beadarray package. I am trying to upload raw bead-level data using these commands:
########################################################
library(beadarray)
datadir <- ("C:/Computer_programs/R/beadarray/cecilia")
targets = read.table("targets.txt", sep = "\t", header = TRUE, as.is = TRUE)
BLData = readIllumina(arrayNames =NULL,
2007 Dec 26
1
nlme package
In using the NLME package (R 2.6.1 for Windows), I am having a problem in running an R script that used to run with no problems using a Linux OS in 2004. So I am wondering if during these last ~3 yrs we had major changes in the syntax of the NLME package that I am not aware.
This is the R script:
library(nlme)
treat=as.factor(c(1,2,1,2,1,2,1,2))
mouse=as.factor(c(1,1,2,2,3,3,4,4))
2015 Nov 04
0
ldap and proxy/proxy_maybe
Hello,
???I am trying to setup dovecot director and am receiving a lot of "Aborted login (proxy dest auth failed)" and "error proxying loops to itself" messages in the dovecot log.
I don't fully understand the dovecot-ldap.conf file config? could someone please let me know if the following is correct. If so what could be causing the errors mentioned above, if not what
2006 Mar 06
4
Newbie problem with adding new method to a class
Hi!
If i have Image class and i''d like to add ''create_thumbnail'' method to
it, which will later be called from product controller, where to put
this method and how to call it?
I''ve tried putting it inside image controller and image model, then call
it like Image.create_thumbnail, but it didn''t work - undefined method
`create_thumbnail''
2008 Jun 10
2
How to join data.frames and vectors of different length, in an inteligent way?
I have a data set something like this:
"YYYY", "Value"
1972 , 117
1984 , 73
1969 , 92
1976 , 113
1999 , 80
1996 , 78
1976 , 98
1984 , 106
1976 , 99
it could be created with:
> dafSamp <- data.frame(cbind(c(1972,1984,1969,1976,1999,1996,1976,1984,1976),c(117,73,92,113,80,78,98,106,99)))
The real dataset is of cause much larger, app. 100.000 samples
2012 Feb 07
1
fixed effects linear model in R
Dear R-helpers,
First of all, sorry for those who have (eventually) already received that request.
The mail has been bumped several times, so I am not sure the list has received it... and I need help (if you have time)! ;-)
I have a very simple question and I really hope that someone could help me
I would like to estimate a simple fixed effect regression model with clustered standard errors by
2005 Oct 05
3
testing non-linear component in mgcv:gam
Hi,
I need further help with my GAMs. Most models I test are very
obviously non-linear. Yet, to be on the safe side, I report the
significance of the smooth (default output of mgcv's summary.gam) and
confirm it deviates significantly from linearity.
I do the latter by fitting a second model where the same predictor is
entered without the s(), and then use anova.gam to compare the
2005 May 13
17
modeling...
I''ve tried tackling this many ways on my own and can''t find a good solution:
Breaking it down to something simplier...
Venue
has one address
Person
has one address
Address
belongs to state
Assuming I don''t want to do tables for venue_addresses and person_addresses.
What is the best way to model this using rails... big thing here is i
want to be able
to reuse a
2005 Dec 10
2
quantile regression problem
Dear List members,
I would like to ask for advise on quantile regression in R.
I am trying to perform an analysis of a relationship between species abundance
and its habitat requirements -
the habitat requirements are, however, codes - 0,1,2,3... where 0<1<2<3
and the scale is linear - so I would be happy to treat them as continuos
The analysis of the data somehow does not work, I am