Hi Tahereh,
In the code you provided, there seems to be a mistake in the calls to
"sample" in that you haven't specified the "size" argument. You should
have gotten an error there. Also, you have assigned both samples to
the same variable name, so there will be no "boot.p" when the call to
t-test i
Hi Jeff,
Why do you say ave() is better suited *because* it always returns a
vector that is just as long as the input vector? Is it because that
feature (of equal length), allows match() to be avoided, and as a
result, the subsequent subsetting is faster with very large datasets?
Thanks, Phi
On Sun, 12 Feb 2017, Steven Yen wrote:
I need help with what may be a simple option in R (or Rstudio)--to
receive an echo of a comment line.
Running the following two-line script in plain R,
# adding
1+2
I did get the echo:
> # adding
> 1+2
[1] 3
>
However, running the same lines in RStudio
The "by" function aggregates and returns a result with generally fewer
rows than the original data. Since you are looking to index the rows in
the original data set, the "ave" function is better suited because it
always returns a vector that is just as long as the input vector:
# I usually wor
On 12/02/17 18:36, Bert Gunter wrote:
Basic stuff!
Either subscripting or ?subset.
There are many good R tutorials on the web. You should spend some
(more?) time with some.
Uh, Bert, perhaps I'm being obtuse (a common occurrence) but it doesn't
seem basic to me. The only way that I can see
Or use rownames and subscripting?
df1 <- read.table( text=
"time v1 v2 v3
1 2 3 4
2 5 6 4
3 1 3 4
4 1 3 4
5 2 3 4
6 2 3 4
",header=TRUE)
df2 <- read.table( text=
"time v11 v12 v13
3 112 3 4
4 112 3 4
",header=TRUE)
df3 <- df1
rownames( d
Hi Val,
The by() function could be used here. With the dataframe dfr:
# split the data by first name and check for more than one last name for
each first name
res <- by(dfr, dfr['first'], function(x) length(unique(x$last)) > 1)
# make the result more easily manipulated
res <- as.table(res)
res
Basic stuff!
Either subscripting or ?subset.
There are many good R tutorials on the web. You should spend some
(more?) time with some.
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed i
I need help with what may be a simple option in R (or Rstudio)--to
receive an echo of a comment line.
Running the following two-line script in plain R,
# adding
1+2
I did get the echo:
> # adding
> 1+2
[1] 3
>
However, running the same lines in RStudio, the comment line does not
appear in
Hi all,
I have a big data set and want to remove rows conditionally.
In my data file each person were recorded for several weeks. Somehow
during the recording periods, their last name was misreported. For
each person, the last name should be the same. Otherwise remove from
the data. Example,
Your "assignments" (<-) are not legitimate R code that can be cut and
pasted. Learn to use dput() to provide examples that we can use.
You fail to say whether the time column of df2 is a proper subset of
df1 or may contain times not in df1. I shall assume the latter. You
also did not say whether t
On 11/02/2017 1:33 PM, Fix Ace via R-help wrote:
Hello, there,
I wrote a loop to check the dimension of all the .txt dataframes:> ls()
[1] "actualpca.table" "b4galnt2""b4galnt2.txt""data"
[5] "galnt4" "galnt4.txt" "galnt5" "galnt5.txt"
[9] "galnt6" "
Hello Everyone,
I have two data frames df1 and df2 as shown below. They
are of different length. However, they have one common column - time.
df1 <-
time v1 v2 v3
1 2 3 4
2 5 6 4
3 1 3 4
4 1 3 4
5 2 3 4
6 2 3 4
df2 <-
time v11 v12 v13
3 112 3 4
Hello, there,
I wrote a loop to check the dimension of all the .txt dataframes:> ls()
[1] "actualpca.table" "b4galnt2" "b4galnt2.txt" "data"
[5] "galnt4" "galnt4.txt" "galnt5" "galnt5.txt"
[9] "galnt6" "galnt6.txt" "glyco" "glyco.txt"
[13]
> On 11 Feb 2017, at 20:13 , Jeff Newmiller wrote:
>
> While the question AS POSED is off base here (and in fact unlikely to have
> any satisfactory answer due to the unavoidable squishiness of pasted graphics
> in Word),
I did wonder whether it wouldn't be easier just to export to a (PDF? WM
While the question AS POSED is off base here (and in fact unlikely to have any
satisfactory answer due to the unavoidable squishiness of pasted graphics in
Word), the OP could investigate the ReporteRs package which can export graphics
directly to word files in a fairly predictable manner, inclu
> On Feb 11, 2017, at 8:26 AM, Jeff Reichman wrote:
>
> R-Help
>
>
>
> How can I format a plot within R-Studio (Plot Windows) to conform to an 8.5
> x 11- landscape. Such that when I Export - Copy to Clip board I can past
> plot into word.
>
This is really the wrong venue for asking ques
R-Help
How can I format a plot within R-Studio (Plot Windows) to conform to an 8.5
x 11- landscape. Such that when I Export - Copy to Clip board I can past
plot into word.
Jeff
[[alternative HTML version deleted]]
__
R-help@r-project
For the record, then, Google listened to my incantation of "rstudio
configuration file" and the second result was:
https://support.rstudio.com/hc/en-us/articles/200534577-Resetting-RStudio-Desktop-s-State
RStudio Desktop is also open source, so you can download the source
code and look at the
On Sat, 11 Feb 2017, vod vos wrote:
Hi every one,
I am using Knitr,
Keep in mind that this list is about R first and foremost. There is a
mailing list for Knitr, and also the maintainer of the knitr package
recommends asking questions on stackoverflow.com.
R and Latex to produce pdf file
This is really a statistical question and not about R, and purely
statistical questions are typically off topic here. I note that there
is a "boot" package that you may wish to consider, and searching on
"bootstrapping" on rseek.org -- which you should always do before
posting here -- produced what
Hi every one,
I am using Knitr, R and Latex to produce pdf file. When using gridExtra to set
up a gtable layout to place multiple grobs on a page,
grid.arrange(facetpoint1,pright1,pright2,pright3,pright4,pright5,pright6,pright7,
ncol=2, layout_matrix=cbind(c(1,1,1,1,1,1,1),c(2,3,4,5,6,7,8)
Dear R group,
I have some question regarding bootstrapping in R. I wish to use
independent samples bootstrapped T-test. I would like to know: 1 how I can
calculate p and t values.2. for means and CI of each sample, should I
report the bootstrapped mean and CI of each group? and not the ones
obta
23 matches
Mail list logo