search for: allaisone

Displaying 20 results from an estimated 28 matches for "allaisone".

2017 Nov 18
3
Complicated analysis for huge databases
...Error in FUN(left, right) : non-numeric argument to binary operator I have been trying since yesterday but but until now I'm not able to identify the correct syntax. ________________________________ From: David Winsemius <dwinsemius at comcast.net> Sent: 18 November 2017 20:06:56 To: Allaisone 1 Cc: Boris Steipe; R-help Subject: Re: [R] Complicated analysis for huge databases > On Nov 18, 2017, at 1:52 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > Although the loop seems to be formulated correctly I wonder why > it gives me these errors : > > -object ...
2017 Nov 18
0
Complicated analysis for huge databases
> On Nov 18, 2017, at 1:52 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > Although the loop seems to be formulated correctly I wonder why > it gives me these errors : > > -object 'i' not found > - unexpected '}' in "}" You probably did not copy the entire code offered. But we ca...
2017 Nov 18
2
Complicated analysis for huge databases
...0.134 0.43 0.64 0.479 4 9 . . ~180 dataframes ________________________________ From: Boris Steipe <boris.steipe at utoronto.ca> Sent: 18 November 2017 00:35:16 To: Allaisone 1; R-help Subject: Re: [R] Complicated analysis for huge databases Something like the following? AllMAFs <- list() for (i in length(SeparatedGroupsofmealsCombs) { AllMAFs[[i]] <- apply(SeparatedGroupsofmealsCombs[[i]], 2, function(x)maf(tabulate(x+1))) } (untested, of course) Also the...
2017 Nov 18
0
Complicated analysis for huge databases
On 18/11/2017 4:40 PM, Allaisone 1 wrote: > > The loop : > > > AllMAFs <- list() > > for (i in length(SeparatedGroupsofmealsCombs) { > AllMAFs[[i]] <- apply( SeparatedGroupsofmealsCombs[[i]], 2, function(x)maf( tabulate( x+1) )) > } > > > gives these errors (I tried this many ti...
2017 Nov 19
1
Complicated analysis for huge databases
...ct the current shape of data (i.e. being separated dataframes). I need to find maf for each column(I,II,III..600) under this dataframe (33_55) and the rest of dataframes. ________________________________ From: Duncan Murdoch <murdoch.duncan at gmail.com> Sent: 18 November 2017 23:15:15 To: Allaisone 1; David Winsemius Cc: R-help Subject: Re: [R] Complicated analysis for huge databases On 18/11/2017 4:40 PM, Allaisone 1 wrote: > > The loop : > > > AllMAFs <- list() > > for (i in length(SeparatedGroupsofmealsCombs) { > AllMAFs[[i]] <- apply( SeparatedGroupsofm...
2017 Nov 18
2
Complicated analysis for huge databases
...de for all dataframes? when I run this code as before :- maf <- apply(SeparatedGroupsofmealsCombs, 2, function(x)maf(tabulate(x+1))) an error message says : dim(X) must have a positive length . I'm not sure which length I need to specify.. any suggestions to correct this syntax ? Regards Allaisone ________________________________ From: Boris Steipe <boris.steipe at utoronto.ca> Sent: 17 November 2017 21:12:06 To: Allaisone 1 Cc: R-help Subject: Re: [R] Complicated analysis for huge databases Combine columns 1 and 2 into a column with a single ID like "33.55", "44.66&qu...
2017 Nov 18
0
Complicated analysis for huge databases
...o the solution is a bit generic since I don't know what the output of maf() looks like in your case, and I don't understand why you use tabulate because I would have assumed that's what maf() does - but that's not for me to worry about :-) B. > On Nov 17, 2017, at 7:15 PM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > > Thanks Boris , this was very helpful but I'm struggling with the last part. > > 1) I combined the first 2 columns :- > > > library(tidyr) > SingleMealsCode <-unite(MyData, MealsCombinations, c(MealA, MealB), re...
2017 Nov 18
0
Complicated analysis for huge databases
The correct code is: for (i in 1:length(SeparatedGroupsofmealsCombs)) { ... I had mentioned that this is untested, but the error is so obvious ... B. > On Nov 18, 2017, at 4:40 PM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > > The loop : > > AllMAFs <- list() > > for (i in length(SeparatedGroupsofmealsCombs) { > AllMAFs[[i]] <- apply( SeparatedGroupsofmealsCombs[[i]], 2, function(x)maf( tabulate( x+1) )) > } > > gives these...
2017 Nov 09
2
Calculating frequencies of multiple values in 200 colomns
...] 1 3 1 1 1 3 2 3 2 1 > tabulate(x) [1] 5 2 3 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 in his "Bloom County" comic strip ) On Thu, Nov 9, 2017 at 3:44 PM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > Thank you so much for your replay > > > Actually, I tried apply() function but struggled with the part of writing > the appropriate function inside it which calculate the frequency of the 3 > values. Tabulate () function is a good star...
2017 Nov 10
0
Calculating frequencies of multiple values in 200 colomns
...seem to ignore calculating the frequency of 0 values and this is my exact problem as the frequency of 0 values should also be calculated for the maf to be calculated correctly. ________________________________ From: Bert Gunter <bgunter.4567 at gmail.com> Sent: 09 November 2017 23:51:35 To: Allaisone 1; R-help Subject: Re: [R] Calculating frequencies of multiple values in 200 colomns [[elided Hotmail spam]] "For example, if I have the values : 1 , 2 , 3 in each column, applying Tabulate () would calculate the frequency of 1 and 2 without 3" Huh?? > x <- sample(1:3,10,TRUE) &...
2017 Nov 17
0
Complicated analysis for huge databases
Combine columns 1 and 2 into a column with a single ID like "33.55", "44.66" and use split() on these IDs to break up your dataset. Iterate over the list of data frames split() returns. B. > On Nov 17, 2017, at 12:59 PM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > > Hi all .., > > > I have a large dataset of around 600,000 rows and 600 columns. The first col is codes for Meal A, the second columns is codes for Meal B. The third column is customers IDs where each customer had a combination o...
2017 Nov 10
2
Calculating frequencies of multiple values in 200 colomns
|> x <- sample(0:2, 10, replace = TRUE) |> x [1] 1 0 2 1 0 2 2 0 2 1 |> tabulate(x) [1] 3 4 |> table(x) x 0 1 2 3 3 4 B. > On Nov 10, 2017, at 4:32 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > > > Thank you for your effort Bert.., > > > I knew what is the problem now, the values (1,2,3) were only an example. The values I have are 0 , 1, 2 . Tabulate () function seem to ignore calculating the frequency of 0 values an...
2017 Nov 10
0
Calculating frequencies of multiple values in 200 colomns
...teipe at utoronto.ca> wrote: > > |> x <- sample(0:2, 10, replace = TRUE) > |> x > [1] 1 0 2 1 0 2 2 0 2 1 > |> tabulate(x) > [1] 3 4 > |> table(x) > x > 0 1 2 > 3 3 4 > > > > B. > > > >> On Nov 10, 2017, at 4:32 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote: >> >> >> >> Thank you for your effort Bert.., >> >> >> I knew what is the problem now, the values (1,2,3) were only an example. The values I have are 0 , 1, 2 . Tabulate () function seem to ignore calculating...
2017 Nov 17
3
Complicated analysis for huge databases
...I'm interested in doing this analysis for only 300 columns but all of the 600 columns. I have another sheet contains names of columns of interest like this : >ColOfinterest Col I IV V . . 300 Any one would help with the best combination of syntax to perform this complex analysis? Regards Allaisone [[alternative HTML version deleted]]
2018 Feb 25
0
reshaping column items into rows per unique ID
Hi Allaisone, If you want a data frame as the output you will have to put up with a few NA values unless each Customer has the same number of diet types: a1df<-read.table(text="CustomerID DietType 1 a 1 c 1 b 2...
2018 Feb 25
4
reshaping column items into rows per unique ID
Hi All I have a datafram which looks like this : CustomerID DietType 1 a 1 c 1 b 2 f 2 a 3 j 4 c 4 c 4 f And I would like to reshape this so I can
2018 Apr 15
4
Adding a new conditional column to a list of dataframes
...each of which looks like the output I have shown above with the new column. I spent a lot of time trying to know what is the mistake I have made in these last two codes but was not able to know the issue. Could you please let me know my mistake and how to correct my syntax ? Kind Regards Allaisone [[alternative HTML version deleted]]
2017 Nov 24
1
Multiple sets of proportion tests
...the same length in the prop.test(x,n). How can I modify "x' or "n" arguments so the analysis gives me the desired output shown in my previous post ? ________________________________ From: Thierry Onkelinx <thierry.onkelinx at inbo.be> Sent: 24 November 2017 21:06:39 To: Allaisone 1 Cc: r-help at r-project.org Subject: Re: [R] Multiple sets of proportion tests Hi anonymous, ?prop.test states that it returns a list. And one of the element is 'p.value'. str() on the output of prop.test() reveals that too. So prop.test()$p.value or prop.test()["p.value"] sh...
2018 Apr 17
0
Time intervals in a datframe
> On Apr 17, 2018, at 10:10 AM, Allaisone 1 <allaisone1 at hotmail.com> wrote: > > > Hi all > > I have a list of multiple datframes with the same column headers. The last column in each datframe contains a vector of "Interval" class after I have produced this column using "lubridate" package. I n...
2018 Feb 25
1
reshaping column items into rows per unique ID
Hi Allaisone, I took a slightly different approach but you might find this either as or more useful than your approach, or at least a start on the path to a solution you need. df1 <- data.frame(CustId=c(1,1,1,2,3,3,4,4,4),DietType=c("a","c","b","f","a",&qu...