similar to: (Fwd) Re: paired t-test. Need to rearrange data?

Displaying 20 results from an estimated 7000 matches similar to: "(Fwd) Re: paired t-test. Need to rearrange data?"

2006 Aug 06
2
paired t-test. Need to rearrange data?
Dear all, I have received some data arranged like this: # original data id <- rep(letters[1:6], each=2) time <- as.factor(rep(1:2, 6)) y <- as.vector(replicate(6, c(rnorm(n=1, mean=1), rnorm(n=1, mean=2)))) test.data <- data.frame(id, time, y) test.data I would like to perform a paired t-test of the y-values at time=1 against those at time=2, with samples paired by their id. Is it
2007 Oct 26
1
[Fwd: Re: subsetting]
Sorry that I was unclear. For an individual to qualify for my analysis I want both of the following two criteria to be fulfilled: First, I want to select measurement taken at a certain age: for the focal individual the year of measurement (year) should be the same as year.hatch Second, I want the focal individual to be born by a mother that reproduces for the first time. So the /parents /of
2018 Nov 29
0
named arguments discouraged in `[.data.frame` and `[<-.data.frame`
Well, the situation with `[.data.frame` (and [<-) is complicated by the fact that the data.frame-method is not a primitive, but the generic IS. I'm not sure about dispatch for primitive-generics, but I bet it's done on the first argument (as with S3). Which means `[`(j=1:2,d,i=1) has nothing to do with `[.data.frame`, as some internal code equivalent to something like `[.integer` is
2010 Aug 25
1
Odp: Finding pairs
Dear Mr Petr Pikal I am extremely sorry for the manner I have raised the query. Actually that was my first post to this R forum and in fact even I was also bit confused while drafting the query, for which I really owe sorry to all for consuming the precious time. Perhaps I will try to redraft my query in a better way as follows. I have two datasets "A" and "B" containing the
2018 Nov 29
2
named arguments discouraged in `[.data.frame` and `[<-.data.frame`
Thanks Bill and Michael for taking the time to share your knowledge! As a further background to my question, here are two examples that I forgot to include in my original post (reminded by Michael's answer). I swapped the i and j arguments in `[.data.frame` and `[<-.data.frame`. With warnings, but else without (?) problem. Using Bill's data: `[.data.frame`(x = d, i = 1, j = 2) # [1]
2006 Jun 15
0
log returns (was: Re: help with table partition)
Please use a descriptive subject and not tag onto a prior thread for new topics. Assuming the first row is time 1 and the second row is time 2 and so on try: diff(log(P)) On 6/15/06, Wong, Kim <kwong at nymex.com> wrote: > > Hi, thank you all for the help. > > The split function works very well. > > I have an additional question. If I have a matrix of prices (row = 30,
2008 Apr 29
2
help text for xlim
Dear R-developers, A student asked me today of how to specify the limits of the x-axis. I knew that he should use xlim, but I tried to encourage him to have a try himself with the various help functions. I do not judge if he used the correct search strategy or right key words, but anyway here is what he tried: he looked at ?plot. There xlim is not mentioned. He checked ?par. There you find
2009 Dec 17
2
Wrong links in help help files? (PR#14155)
Dear R developers, ?help.search ...opens a tab in my browser (Firefox 3.5.6, Win XP): http://127.0.0.1:31642/library/utils/html/help.search.html When I click on the link for "?", (http://127.0.0.1:31642/library/utils/help/?) in the last line of "Details", I get an error message: "Server error: invalid response from R". Similarly, The link to "??"
2010 Jan 11
2
Documentation: format of read.table help text (PR#14180)
Dear R developers, I find the format of descriptions of the arguments in the read.table help text slightly inconsistent. For example, the logical arguments comes in seven different formats, more or less explicit about the consequences of a TRUE (or FALSE): 1. check.names logical. If TRUE then the names... 2. blank.lines.skip logical: if TRUE blank lines... 3. flush logical: if TRUE,
2023 Apr 03
0
Should help of estimate in t.test be corrected?
Hallo, you are probably right that "the estimated mean or difference in means depending on whether it was a one-sample test or a two-sample test" should be rephrased to "the estimated mean or difference in means depending on whether it was a one-sample test, two-sample test or two sample paired test" Cheers Petr > -----Original Message----- > From: Samuel Granjeaud
2009 Jan 15
0
help text for ave()
Dear R developers, In the help text for ave() you can read in Arguments section: "... Grouping variables, typically factors, all of the same length as x" ...and in Value: "If ... is g1,g2,". I think a description in the Arguments section of how two or more grouping variables is specified together with an Example would be very helpful. In absence of a help text I just
2018 Nov 28
0
named arguments discouraged in `[.data.frame` and `[<-.data.frame`
They can get bitten in the last two lines of this example, where the 'x' argument is not first: > d <- data.frame(C1=c(r1=11,r2=21,r3=31), C2=c(12,22,32)) > d[1,1:2] C1 C2 r1 11 12 > `[`(d,j=1:2,i=1) C1 C2 r1 11 12 Warning message: In `[.data.frame`(d, j = 1:2, i = 1) : named arguments other than 'drop' are discouraged > `[`(j=1:2,d,i=1) Error in (1:2)[d, i =
2018 Feb 13
0
plotting the regression coefficients
Hi scale_colour_gradient(?red?, ?blue?) should do the trick. Actually I found it by Google ggplot colour http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/ http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually#gradient-colors-for-scatter-plots question. So you could find it too and probably far more quickly then myself as I have also other duties. Cheers
2006 Sep 18
0
Question on apply() with more information...
>From: =?ISO646-US?Q?Gunther_H=3Fning?= <gunther.hoening at ukmainz.de> >Date: 2006/09/18 Mon AM 06:26:25 CDT >To: 'Petr Pikal' <petr.pikal at precheza.cz> >Cc: r-help at stat.math.ethz.ch >Subject: Re: [R] Question on apply() with more information... I think you want something like below but it probably needs some fixing up because i don't recall the syntax
2007 Oct 01
0
Clustering literature was Re: nonlinear regression
Hi It is preferable to echo your posts to r-help, you usually get more answers and some definitelly superb to mine. It is also better to start a new mail if your question has nothing to do with original subject "Maura E Monville" <maura.monville at gmail.com> napsal dne 01.10.2007 17:44:43: > Unluckily I do not have the privilege of practising with R all day > long. I
2006 Feb 07
1
(second round) creating a certain type of matrix
Hi R users Here is what I got with help from Petr Pikal (Thanks Petr Pikal). I modified Petr Pikal's code to a little to meet my purpose. I created a function to generate a matrix generate.matrix<-function(n.variable) { mat<-matrix(0,n.variable,(n.variable/2)/5+1) #matrix of zeroes dd<-dim(mat) # actual dimensions mat[1:(dd[1]/2),1]<-1 #put 1 in first half of first column
2017 Jul 28
0
FW: Fail to install package in R
CC to R-help From: PIKAL Petr Sent: Friday, July 28, 2017 2:20 PM To: 'li xiaomei' <lixiaomei0921 at gmail.com> Cc: r-help at r-project.org Subject: RE: [R] Fail to install package in R Hi You should keep conversation within the list, others could bring better answers. I still do not see any error message. I found this answer to seemingly same question.
2018 Feb 12
0
plotting the regression coefficients
Petr, there was a thinko in your response. tmp <- data.frame(m=factor(letters[1:4]), n=1:4) tmp tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right tmp[order(tmp$m),] tmp <- data.frame(m=factor(letters[1:4]), n=1:4) levels(tmp$m) <- c("c","b","a","d") ## wrong tmp[order(tmp$m),] changing levels
2006 Aug 03
2
efficient way to make NAs of empty cells in a factor (or character)
Dear all, I have some csv-files (originating from Excel-files) containing empty cells. In my example file I have four variables of different classes, each with some empty cells in the original csv-file: > test <- read.csv2("test.csv", dec=".") > test id id2 x y 1 a 1 NA 2 b e NA 2.2 3 f 3 3.3 4 c g 4 4.4 > class(test$id) [1]
2004 Oct 08
0
library in R2.0.0 - summary
Thanks to Andy Liaw and prof.Ripley for their comments. I finally managed my function set work without need for proper installation. However I must try it sometimes. I got tools from http://www.murdoch-sutherland.com/Rtools/tools.zip but I did not install Pearl yet. I tried make pkg-fun which resulted in sequence of errors which I corrected according what I was told by screen and