search for: marna

Displaying 17 results from an estimated 17 matches for "marna".

Did you mean: maria
2018 May 01
2
how can I convert a long to wide matrix?
...there are repeated within a same group of "timeGroup". Therefore I wanted following FinalData1 B1 B2 id_X "A" "B" id_Y "A" "B" thanks, On Tue, May 1, 2018 at 4:05 PM, Jim Lemon <drjimlemon at gmail.com> wrote: > Hi Marna, > I think this is due to having three rows for id_X and only two for > id_Y. The function creates a data frame with enough columns to hold > the greatest number of values for each ID variable. Notice that the > SITE_n columns contain three values for id_X (A, A, B) and two for > id_...
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...
2018 May 01
2
how can I convert a long to wide matrix?
...timeGroup EventDate_1 EventDate_2 EventDate_3 SITE_1 SITE_2 1 id_X B1 9/8/16 9/9/16 9/15/17 A B 2 id_Y B1 9/7/16 9/15/16 <NA> A B Thanks On 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 tryi...
2018 May 01
0
how can I convert a long to wide matrix?
Hi Marna, I think this is due to having three rows for id_X and only two for id_Y. The function creates a data frame with enough columns to hold the greatest number of values for each ID variable. Notice that the SITE_n columns contain three values for id_X (A, A, B) and two for id_Y (A, B, NA) as there was...
2018 Apr 13
0
repeating functions for different folders?
Hi Marna, Assuming that you are descending into different subdirectories from the same directory: directories<-c("dir1","dir2","dir3") for(directory in directories) { setwd(directory) # do whatever you want to do # then return to the directory above setwd(".."...
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 a...
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
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 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
...uot;) ---------------------------------------- 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[unli...
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
...w(dat1) > 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...
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)?
...ls "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...
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 relat...