Displaying 17 results from an estimated 17 matches for "wagley".
2018 May 01
2
how can I convert a long to wide matrix?
...ion it is unknown. Even if there was only one value for SITE in
> the original data frame, it should be repeated for the correct number
> of observations. I think you may be mixing up case ID with location of
> observation.
>
> Jim
>
>
> On Wed, May 2, 2018 at 8:48 AM, Marna Wagley <marna.wagley at gmail.com>
> wrote:
> > Hi Jim,
> > Thank you very much for your suggestions. I used it but it gave me three
> > sites. But actually I do have only two sites "Id_X" and "Id_y" . In fact
> > "A" is repeated two times for...
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna,
This is a condition that the function cannot handle. It would be
possible to reformat the result based on the time intervals, but the
stretch_df function doesn't try to interpret the values, just
stretches them out to a wide format.
Jim
On Wed, May 2, 2018 at 9:16 AM, Marna Wagley <marna.wagley at gmail.com> wrote:
> Hi Jim,
> The data set is correct. I took two readings from the "SITE A" within a
> short time interval, therefore I want to take the first value if there are
> repeated within a same group of "timeGroup".
> Therefore I w...
2018 May 01
2
how can I convert a long to wide matrix?
...n Tue, May 1, 2018 at 3:32 PM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Marna,
> Try this:
>
> library(prettyR)
> stretch_df(dat,idvar="ID",to.stretch=c("EventDate","SITE"))
>
> Jim
>
>
> On Wed, May 2, 2018 at 8:24 AM, Marna Wagley <marna.wagley at gmail.com>
> wrote:
> > Hi R user,
> > I was trying to convert a long matrix to wide? I have an example and
> would
> > like to get a table (FinalData1):
> >
> >
> > FinalData1
> > B1 B2
> > id_X "A"...
2018 May 01
0
how can I convert a long to wide matrix?
...uot;A"), and for the third
occasion it is unknown. Even if there was only one value for SITE in
the original data frame, it should be repeated for the correct number
of observations. I think you may be mixing up case ID with location of
observation.
Jim
On Wed, May 2, 2018 at 8:48 AM, Marna Wagley <marna.wagley at gmail.com> wrote:
> Hi Jim,
> Thank you very much for your suggestions. I used it but it gave me three
> sites. But actually I do have only two sites "Id_X" and "Id_y" . In fact
> "A" is repeated two times for "Id_X". If it...
2018 Apr 13
0
repeating functions for different folders?
...;dir1","dir2","dir3")
for(directory in directories) {
setwd(directory)
# do whatever you want to do
# then return to the directory above
setwd("..")
}
This will allow you to start and finish in the same directory.
Jim
On Fri, Apr 13, 2018 at 9:47 AM, Marna Wagley <marna.wagley at gmail.com> wrote:
> Hi R users,
> I need to run a analysis using a data for each folder. I do have several
> folders. Each folder contains several files but these files name are
> similar to the files that is saved into another folders. I need to repeat
> the...
2018 Apr 12
2
repeating functions for different folders?
Hi R users,
I need to run a analysis using a data for each folder. I do have several
folders. Each folder contains several files but these files name are
similar to the files that is saved into another folders. I need to repeat
the analysis for every folder and would like to save the output in that
particular folder. After completing the analysis in one folder, I want to
move another folder.
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna,
Try this:
library(prettyR)
stretch_df(dat,idvar="ID",to.stretch=c("EventDate","SITE"))
Jim
On Wed, May 2, 2018 at 8:24 AM, Marna Wagley <marna.wagley at gmail.com> wrote:
> Hi R user,
> I was trying to convert a long matrix to wide? I have an example and would
> like to get a table (FinalData1):
>
>
> FinalData1
> B1 B2
> id_X "A" "B"
> id_Y "A" &quo...
2016 Apr 14
3
calculate sampel size?
Hi R user,
Can we calculate sample size when only mean and SE are given?
Let say one example, I have mean with SE is 0.54+-0.0517 (mean+-SE). Is
there any way to find the samples (sample size n) in that condition in R?
i think this question is not related to R, I hope you won't mind.
Thanks
[[alternative HTML version deleted]]
2018 May 01
2
how can I convert a long to wide matrix?
Hi R user,
I was trying to convert a long matrix to wide? I have an example and would
like to get a table (FinalData1):
FinalData1
B1 B2
id_X "A" "B"
id_Y "A" "B"
but I got the following table using the following code.
FinalData1
B1 B2
id_X "A" "A"
id_Y "A" "B"
the code and the
2018 Apr 18
3
How to replace numeric value in the column contains Text (Factor)?
Hi R user,
Would you mind to help me on how I can change a value in a specific column
and row in a big table? but the column of the table is a factor (not
numeric).
Here is an example. I want to change dat[4:5,3]<-"20" but it generated NA>
do you have any suggestions for me?
dat<-structure(list(Sites = structure(1:5, .Label = c("Site1", "Site2",
2017 Oct 18
1
creating tables with replacement
...----------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352
-----Original Message-----
From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of PIKAL Petr
Sent: Wednesday, October 18, 2017 3:38 AM
To: Marna Wagley <marna.wagley at gmail.com>; r-help mailing list <r-help at r-project.org>
Subject: Re: [R] creating tables with replacement
Hi
maybe there is another more elegant solution but something like this
> idx <- 1:nrow(dat1)
> lll <- split(idx, dat1$group)
> dat1[unlist(lapp...
2017 Nov 10
1
How to create separate legend for each plot in the function of facet_wrap in ggplot2?
Hi R users,
I need to create more than 20 figures (one for each group) in one page. I
have a common legend for 20 figures using the facet_wrap. However the
range of the values among the groups are very wide. For example one group
has the value of 0 to 3, but the values of some of the groups has ranged
from 0 to 20 so that when I used a single common legend for all 20 figures,
I could not display
2017 Oct 18
0
creating tables with replacement
...; lll <- split(idx, dat1$group)
> dat1[unlist(lapply(lll, sample, rep=TRUE)),]
gives you selected rows.
You could use for cycle or save those data frames manually
Cheers
Petr
> -----Original Message-----
> From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Marna
> Wagley
> Sent: Wednesday, October 18, 2017 9:46 AM
> To: r-help mailing list <r-help at r-project.org>
> Subject: [R] creating tables with replacement
>
> Hi R User,
> I am new in R and trying to create tables with selecting rows randomly (but
> with replacement) for each group...
2017 Oct 18
2
creating tables with replacement
Hi R User,
I am new in R and trying to create tables with selecting rows randomly (but
with replacement) for each group but each group should have same number as
original. Is it possible to create it using the following example data set?
Your help is highly appreciated.
dat1<-structure(list(RegionA = structure(c(1L, 1L, 2L, 3L, 3L, 4L,
5L, 5L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L, 6L),
2018 Apr 18
0
How to replace numeric value in the column contains Text (Factor)?
...ot;20","high","low",..: 2 3 4 1 1
----------------------------------------
David L Carlson
Department of Anthropology
Texas A&M University
College Station, TX 77843-4352
-----Original Message-----
From: R-help <r-help-bounces at r-project.org> On Behalf Of Marna Wagley
Sent: Wednesday, April 18, 2018 12:56 PM
To: r-help mailing list <r-help at r-project.org>
Subject: [R] How to replace numeric value in the column contains Text (Factor)?
Hi R user,
Would you mind to help me on how I can change a value in a specific column and row in a big table? but the col...
2017 Oct 20
1
create a loop
Hi R Users,
I do have very big data sets and wanted to run some of the analyses many
times with randomization (1000 times).
I have done the analysis using an example data but it need to be done with
randomized data (1000 times). I am doing manually for 10000 times but
taking so much time, I wonder whether it is possible to perform the
analysis with creating a loop for many replicated datasets?
2016 Apr 14
0
[FORGED] calculate sampel size?
On 14/04/16 19:28, Marna Wagley wrote:
> Hi R user,
> Can we calculate sample size when only mean and SE are given?
> Let say one example, I have mean with SE is 0.54+-0.0517 (mean+-SE). Is
> there any way to find the samples (sample size n) in that condition in R?
>
> i think this question is not related to R...