Displaying 20 results from an estimated 500 matches similar to: "linear contrasts with anova"
2002 May 07
1
Problem with ties in rank()
Hello All:
I have a vector of data, z
> z
[1] 0.1 0.1 0.1 0.1 0.2 0.2 0.3 0.3 0.3 0.4 0.5 0.5 0.5 0.7
0.7 0.7 0.9 0.9 1.1
[20] 1.1 1.2 1.3 1.4
The first 4 elements have values of 0.1 followed 2 elements with values 0.2.
When I invoke rank(z), I expected to get (1+2+3+4)/4 = 2.5 for the first 4
elements in the ranking and (5+6)/2 = 5.5 for elements 5 and 6. But what I
do
2006 Mar 02
1
Curious subsetting behavior
I have a simple vector, called tmp that I want to subset based on another
vector called vec. Everything works as expected except for below where the
subsetting returns something other than the original data. Any ideas?
> vec <- c(1,2,3,4,5,59,60,27,32,21)
> tmp
[1] 1.0 1.1 2.0 2.1 2.2 3.0 3.1 4.0 5.0 5.1 6.0 7.0 8.0 8.1
9.0
[16] 9.1 9.2 10.0 10.1 11.0 12.0 13.0 14.0
2007 Apr 20
2
sorting data in R
hello,
I'd like know how to sort a data frame in R for example how I should do to sort by Catholic with swiss data frame like below
thanks
Fertility Agriculture Examination Education Catholic Infant.Mortality
Courtelary 80.2 17.0 15 12 9.96 22.2
Delemont 83.1 45.1 6 9 84.84 22.2
2008 Oct 15
1
combining same-day lab measurements with 'apply'
Another request for help implementing the 'apply' functions to avoid a
loop structure...
I am working with a data set that includes lab measurements taken at
different dates for the subjects, with some subjects having more
results than others. I would like to average lab results for each
subject that were taken on the same day. I can do this using a for
loop, but would like to know how
2008 Nov 05
2
date translate in R from SAS
En indlejret tekst med ukendt tegns?t er blevet fjernet...
Navn: ikke tilgængelig
Url: <https://stat.ethz.ch/pipermail/r-help/attachments/20081105/3106f04e/attachment.pl>
2007 Apr 11
0
raidz2 another resilver problem
Hello zfs-discuss,
One of a disk started to behave strangely.
Apr 11 16:07:42 thumper-9.srv sata: [ID 801593 kern.notice] NOTICE: /pci at 1,0/pci1022,7458 at 3/pci11ab,11ab at 1:
Apr 11 16:07:42 thumper-9.srv port 6: device reset
Apr 11 16:07:42 thumper-9.srv scsi: [ID 107833 kern.warning] WARNING: /pci at 1,0/pci1022,7458 at 3/pci11ab,11ab at 1/disk at 6,0 (sd27):
Apr 11 16:07:42 thumper-9.srv
2002 May 07
1
More on ties with rank()
I am grateful to Prof. Ripley for his explanation. Indeed, rounding explains
it all.
I take the difference between two vectors and call it "z"
method.a <- c(6.3, 6.3, 3.5, 5.1, 5.5, 7.7, 6.3, 2.8, 3.4, 5.7, 5.6, 6.2,
6.6,
7.7, 7.4, 5.6, 6.3, 8.4, 5.6, 4.8, 4.3, 4.2, 3.3,
3.8, 5.7, 4.1)
method.b <- c(5.2, 6.6, 2.3, 4.4, 4.1, 6.4, 5.4, 2.3, 3.2, 5.2, 4.9,
2013 Apr 10
6
means in tables
Hi.
I have 2 tables, with same dimensions (8000 x 5). Something like:
tab1:
V1 V2 V3 V4 V5
14.23 1.71 2.43 15.6 127
13.20 1.78 2.14 11.2 100
13.16 2.36 2.67 18.6 101
14.37 1.95 2.50 16.8 113
13.24 2.59 2.87 21.0 118
tab2:
V1 V2 V3 V4 V5
1.23 1.1 2.3 1.6 17
1.20 1.8 2.4 1.2 10
1.16 2.6 2.7 1.6 11
1.37 1.5 2.0 1.8 13
1.24 2.9 2.7 2.0 18
I need generate a table of averages, the
2009 Jan 05
1
How to extract range of colums in a data frame
Dear all,
I have the following data frame:
> dat
V1 V2 V3 V4 V5 V6 V7 V8 V9
1 1 AAAACACCCACCCCCCCCCCCCCCCCCCCCCCCC 9.0 18 12.00 18.0 15.0 12.0 6.0
2 1 ACGATACGGCGACCACCGAGATCTACACTCTTCC 18.0 8 12.00 18.0 15.0 12.0 18.0
3 1 ACTACTGCTCCCCCCCCACTCCCCCCCCCCCCCC 15.0 8 12.00 12.0 18.0 12.0 12.0
4 1 ACTTATACGGCGACCACCGAGATCTACACTCTTT 15.0
2008 Jan 27
2
Likelihood optimization numerically
Dear List,
I am not sure how should i optimize a log-likelihood numerically:
Here is a Text book example from Statistical Inference by George Casella, 2nd
Edition Casella and Berger, Roger L. Berger (2002, pp. 355, ex. 7.4 # 7.2.b):
data = x = c(20.0, 23.9, 20.9, 23.8, 25.0, 24.0, 21.7, 23.8, 22.8, 23.1, 23.1, 23.5, 23.0, 23.0)
n <- length(x)
# likelihood from a 2 parameter Gamma(alpha,
2009 Oct 29
2
Rounding and printing
Hello,
I am trying to print a table with numbers all rounded to the same number of digits (one after the decimal), but R seems to want to not print ".0" for integers. I can go in and fix it one number at a time, but I'd like to understand the principle. Here's an example of the code. The problem is the 13th element, 21 or 21.0:
>nvb_deaths <- round(ss[,10]/100,digits=1)
2007 Jun 05
3
read table
Hi,
I'm a novice of R.
I want to read the following table into R:
names mpg cyl disp hp drat
Mazda RX4 21.0 6 160.0 110 3.90
Mazda RX4 Wag 21.0 6 160.0 110 3.90
The command I used is:
> test <- read.table(file.choose(),header=T)
The result is:
Error in read.table(file.choose(), header = T) :
more columns than column names
2013 Aug 25
2
RCurl cookiejar
R-helpers,
When I use cURL in the Terminal:
curl --cookie-jar cookie.txt --url "http://corpusdelespanol.org/x.asp" --user-agent "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:16.0) Gecko/20100101 Firefox/23.0" --location --include
a cookie file "cookie.txt" is saved to my working directory. However, when I try what I think is the equivalent command R with RCurl:
2013 Apr 12
3
Why copying columns of a data.frame becomes numeric?
Dear list,
I want the 1st, 2nd, 5th, and 6th columns of mtcars. After copying them,
the columns become numeric class rather than data frame.
But, when I copy rows, they data frame retains its class. Why is this? I
don't see why copying rows vs columns is so different.
> class(mtcars)
[1] "data.frame"
> head(mtcars)
mpg cyl disp hp drat wt qsec vs
2010 Dec 23
1
speed issues? read R_inferno by Patrick Burns: & a memory query
Hi,
I'm just starting out with R and came across R_inferno.pdf by Patrick Burns
just yesterday - I recommend it!
His description of how 'growing' objects (e.g. obj <- c(obj,
additionalValue) eats up memory prompted me to rewrite a function (which
made such calls ~210 times) so that it used indexing into a dimensioned
object instead (i.e. obj[i, ] <- additionalValue).
This
2012 Mar 03
3
How to read this data properly?
Dear all, I have been given a data something like below:
Dat = "2 3 28.3 3.05 8 3 3 22.5 1.55 0 1 1 26.0 2.30 9 3 3 24.8 2.10 0
3 3 26.0 2.60 4 2 3 23.8 2.10 0 3 2 24.7 1.90 0 2 1 23.7 1.95 0
3 3 25.6 2.15 0 3 3 24.3 2.15 0 2 3 25.8 2.65 0 2 3 28.2 3.05 11
4 2 21.0 1.85 0 2 1 26.0 2.30 14 1 1 27.1 2.95 8 2 3 25.2 2.00 1
2 3 29.0 3.00 1 4 3 24.7 2.20 0 2 3 27.4 2.70 5 2 2 23.2 1.95
2017 Jun 01
3
odfWeave - A loop of the "same" data
Before I go and do this another way - can I check if anyone has a way of looping through data in odfWeave (or possibly sweave) to do a repeating analysis on subsets of data?
For simplicity lets use mtcars dataset in R to explain. Dataset looks like this:
> mtcars
mpg cyl disp hp drat wt ...
Mazda RX4 21.0 6 160 110 3.90 2.62 ...
Mazda RX4 Wag 21.0 6 160 110 3.90
1998 Apr 07
3
R-beta: spline problems(?)
Hi,
I am a total beginner with this whole thing so please have patience!
I am trying to run an S-plus program with a certain line:
spline(1:nrow(y), y[,1],n=100);
This crashes with:
Error: NAs in foreign function call (arg 8)
Apparently, this is caused by the last command of spline:
u <- seq(xmin, xmax, length.out = n)
.C("spline_eval", z$method, length(u), x = u, y =
2007 Jun 05
6
xen network Dom0
hi,
i''ve tried again Debian testing, with xen 3.1 binary.
it works fine but i can''t have the networt working:
i''ve have an ethernet card with
static IP: 172.20.2.160
gateway: 172.20.2.1
uname -r :2.6.18-xen
without xen, the network works fine.
here''s my output:
eth0 Lien encap:Ethernet HWaddr 00:0F:FE:6B:57:32
inet adr:172.20.2.160
1997 Apr 29
9
Yet Another DIP Exploit?
I seem to have stumbled across another vulnerability in DIP. It
appears to allow any user to gain control of arbitrary devices in /dev.
For instance, I have successfully stolen keystrokes from a root login as
follows... (I could also dump characters to the root console)
$ whoami
cesaro
$ cat < /dev/tty1 <------ root login here
bash: /dev/tty1: Permission denied