Displaying 20 results from an estimated 80 matches similar to: "Help with aggregate and cor"
2011 Sep 01
3
Oh apply functions, how you confuse me
Hi guys,
I have a crap load of data to parse and have enjoyed creating a script that
takes this data and creates a number of useful graphics for our area. I am
unable to figure out one summary though and its all cause I dont fully
understand the apply family of functions. Consider the following:
#Create data
2012 Sep 27
1
List of Variables in Original Order
I am trying to Sweave the output of calculating correlations between one
variable and several others. I wanted to print a table where the
odd-numbered rows contain the variable names and the even-numbered rows
contain the correlations. So if VarA is correlated with all the variables in
mydata.df, then it would look like
var1 var2 var3
corr1 corr2 corr3
var4 var5
2011 May 08
1
Hosmer-Lemeshow 'goodness of fit'
I'm trying to do a Hosmer-Lemeshow 'goodness of fit' test on my logistic
regression model.
I found some code here:
http://sas-and-r.blogspot.com/2010/09/example-87-hosmer-and-lemeshow-goodness.html
The R code is above is a little complicated for me but I'm having trouble
with my answer:
Hosmer-Lemeshow: p=0.6163585
le Cessie and Houwelingen test (Design library): p=0.2843620
2000 May 01
1
tick marks on mfrow=c(3,3) plot
I am generating an array of similar plots using the par(mfrow=c(3,3))
method. Everything works fine except the plot only puts y-axis tick marks
on cells in column one and x-axis tick marks on cells in row three. I
would like tick marks on both the x and y axix of all 9 plots in my array.
I am generating plots using the following two functions
three.by.three.plot <- function(ss)
{
2011 Nov 04
1
zoo performance regression noticed (1.6-5 is faster...)
Good morning,
I have discovered what I believe to be a performance regression
between Zoo 1.6x and Zoo 1.7-6 in the application of rollapply.
On zoo 1.6x, rollapply of my function over my data takes about 20
minutes. Using 1.7-6, the same code takes about 6 hours.
R --version
R version 2.13.1 (2011-07-08)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform:
2012 Dec 03
4
How to calculate the spatial correlation of several files?
dir1 <- list.files("C:\\Users\\aalyaari\\Desktop\\cor", "*.bin",
full.names = TRUE)
dir2 <- list.files("C:\\Users\\aalyaari\\Desktop\\cor2", "*.bin",
full.names = TRUE)
results <- list()
for (.files in dir1){ # read in the 365 files as a vector of
numbers for dir1
file1 <- do.call(rbind,(lapply(.files, readBin ,
2012 Jan 22
4
undefined method `gsub!' for 2012-01-22 17:00:00 -0500..2012-01-23 00:00:00 -0500:Chronic::Span
Hey all,
I am getting this error:
NoMethodError (undefined method `gsub!'' for 2012-01-22 17:00:00
-0500..2012-01-23 00:00:00 -0500:Chronic::Span):
in this code:
date_range = Chronic.parse(the_date, :guess =>
false)
reports.sum_distance_by_date(date_range).each do |d|
u[:m] << d
end
def
2006 Feb 28
5
Problem with paginate, include and foreign keys
Hi all,
Solaris 10
Ruby 1.8.4
Rails 1.0.0
Postgres 8.1
postgres driver 0.7.1
I''m having a problem with getting paginate() to properly pick up an FK
constraint properly.
I don''t seem to have this issue with ActiveRecord, however. Consider:
create table start_dates (
id bigserial,
start_date date unique,
max_slots int default 40,
primary key (id)
);
create
2003 Aug 20
2
samba-3.0rc1 Can access PDC but not others
Hello,
I am trying to migrate an NT domain from an NT PDC to a samba3.0 PDC
without disrupting users or requiring them to change passwords, etc. The
complication is that there are NT fileservers in the domain already, so
it's important that the users be transferred to the samba machine with
SID's and RID's intact (so they can access these shares with the same
permissions).
2011 Mar 30
0
offset in gam
Hi, we are modelling dusky grouper distribution using underwater visual
census. Our response variable is the abundance of groupers but we want to
see differences in habitat related to maturity because dusky groupers use
different habitats when they're juveniles versus adults. So we're using the
% of maturity.
ie 1 individual that is 50cm TL gets aprox 0.5 (50% chances to be mature and
50%
2013 Jan 07
0
Something wrong with echo_diagnostic.m
Hello everyone, I'm a new comer to this mailing list.
I found that the echo_diagnostic.m included in speex-1.2rc1 seems to
have grammar mistakes which cause parse error in octave 3.6.2. I wonder
if anyone have ever executed this code under octave/matlab.
I also made some minor modifications to the file to correct those errors
and publish it here.
If it can helps the project to be more
2011 Dec 01
2
R, PostgresSQL and poor performance
Hi List
Apologies if this isn''t the correct place for this query (I''ve tried a search of the mail archives but not had much joy).
I''m running R (2.14.0) on a Mac (OSX v 10.5.8, 2.66GHz, 4GB memory) and am having a few performance issues with reading data in from a Postres database (using RPostgreSQL). My query / code are as below
# -----------------------------
2004 Nov 11
5
wrong answer for simple expressions
I am experiencing strange (to me) output when trying to do simple
calculations. Expressions that should equal zero yield non-zero
values.
Examples:
> a <- 4.1-3.1
> b <- 5.1-4.1
> a-b
[1] -4.440892e-16
> (4.1-3.1)-(5.1-4.1)
[1] -4.440892e-16
When this last expression is expanded, I get the right answer:
> 4.1-3.1-5.1+4.1
[1] 0
I am using the binary packaged version
2012 Aug 08
0
Testing for a second order factor using SEM package
Hi!
The following model specification works when testing for first order
factors, but when I attempt to test for a second order factor by adding the
last 4 lines in the model, I get the error message below:
model.cfa.ru <- specifyModel()
sRU1 <- sRU, NA, 1
sRU2 <- sRU, lam12
sRU3 <- sRU, lam13
sRU4 <- sRU, lam14
sRU5 <- sRU, lam15
sRU6 <- sRU, lam16
sRU <-> sRU, mak1
2006 Dec 23
1
Question regarding window output extents
Hi,
in a plugin I am developing with some other people (namely: tabbed
window grouper), we want to paint a glow like effect around the windows.
This is done by adding the glow as "second decoration" around the window
decoration.
The question now is: How can we communicate the fact that there is a
second set of decoration properly to other plugins so that window
damaging and
2006 Jun 27
1
Post this please
Post the following please. Thanks!
Voxura, an internet video sharing startup, is looking for a skilled and
motivated Web User Interface Developer to work with us in building our video
sharing products and features. You will work with a strong, creative team
building features used by people every day.
Our team is looking for a Web User Interface Developer with in-depth
knowledge of web
2005 Jun 22
2
Trouble with ifelse and if statement (PR#7962)
Full_Name: Woolton Lee
Version: 2.1
OS: windows
Submission from: (NULL) (128.118.224.46)
I did the following ('g' and 'h' are both numeric vectors)
> i <- abs(g-h)
creating a vector 'i' with values,
> i
[1] 0.08 0.00 0.33 0.00 0.00 0.00 0.00 0.33 0.00 0.00 0.08 0.08 0.20 0.00 0.13
Now, I want to create a new vector =1 whenever 'i' = 0.33 and =0
2003 Jul 14
6
bug?
Dear R programmers,
is there a sensible explanation for the following behaviour? The second
command seems not to be interpreted correctly.
> seq(0.6, 0.9, by=0.1) == 0.8
[1] FALSE FALSE TRUE FALSE
> seq(0.7, 0.9, by=0.1) == 0.8
[1] FALSE FALSE FALSE
> c(0.7, 0.8, 0.9) == 0.8
[1] FALSE TRUE FALSE
> seq(0.9, 0.7, by=-0.1) == 0.8
[1] FALSE TRUE FALSE
I am running R version 1.7.1 on
2010 May 19
3
offset in gam and spatial scale of variables
Hi,
We are analizing the relationship between the abundance of groupers in line
transects and some variables. We are using the quasipoisson distribution. Do
we need to include the length of the transects as an offset if they all have
the same length??
Also, can we include in the gam models variables that are measured at
different spatial scales? We have done an analysis to see what variables
2018 Feb 15
0
Is it possible to lower the domain and forest functional level
On Wed, 2018-02-14 at 11:14 +0100, Christophe Borivant wrote:
> I don't know exactly, but there were problems with indexes ( as the user said ).
> We did not try with the current release and our manager wants to go back to Microsoft :-(
> Our samba version is 4.7.5.
OK, that is the current release. The last changes targeted at
sharepoint where a couple of years ago.
> I've