similar to: Grouping rows of data by day

Displaying 20 results from an estimated 600 matches similar to: "Grouping rows of data by day"

2011 Dec 08
2
anova analysis on factors...
Hi all, If we wanted to study the effect on the mean of the hourly data based on the hours within a day... and we wanted to do Anova analysis... We have two choices: Please see below: Why are these two approaches giving very different p-values? And which one shall I use? Thanks a lot! 1. treating the hours as double/floating numbers: anova(lm(hourlydata~as.double(hours_factors))) Df Sum
2010 May 31
2
accessing a data frame with row names
Readers, I have entered a file into r: ,column1,column2 row1,0.1,0.2 row2,0.3,0.4 using the command: dataframe<-read.table("/path/to/file.csv",header=T,row.names=1) When I try the command: dataframe[,2] I receive the response: NULL I was expecting: row1 0.2 row2 0.4 What is my error with the syntax please? Yours, r251 mandriva2009
2004 Nov 23
5
number of pairwise present data in matrix with missings
is there a smart way of determining the number of pairwise present data in a data matrix with missings (maybe as a by-product of some statistical function?) so far, i used several loops like: for (column1 in 1:99) { for (column2 in 2:100) { for (row in 1:500) { if (!is.na(matrix[row,column1]) & !is.na(matrix[row,column2])) { pairs[col1,col2] <- pairs[col1,col2]+1
2008 Feb 26
1
Split data.frames depeding values of a column
Hello to all is there a function wich splits a data.frame (column1,column2,column3,....) into data1 <-(column1,column3....) #column2 = 1 data2 <-(column1,column3....) #column2 = 2 data3 <-(column1,column3....) #column2 = 3 ... Regards Knut
2009 May 14
2
Function to read a string as the variables as opposed to taking the string name as the variable
I am writing a custom function that uses an R-function from the reshape package: cast. However, my question could be applicable to any R function. Normally one writes the arguments directly into a function, e.g.: result=cast(table1, column1 + column2 + column3 ~ column4, mean) (1) I need to be able to write this statement as follows: result=cast(table1, string_with_columns ~
2024 Jun 06
2
R Shiny Help - Trouble passing user input columns to emmeans after ANOVA analysis
Hello everybody, I have experience coding with R, but am brand new to R Shiny. I am trying to produce an application that will allow users to upload their own dataset, select columns they want an ANOVA analysis run on, and generate graphs that will allow users to view their results. However, I am getting the following error: *"Argument is of length zero."* Being new to Shiny, I am
2024 Dec 11
1
Cores hang when calling mcapply
Hello Thomas, Consider that the primary bottleneck may be tied to memory usage and the complexity of pivoting extremely large datasets into wide formats with tens of thousands of unique values per column. Extremely large expansions of columns inherently stress both memory and CPU, and splitting into 110k separate data frames before pivoting and combining them again is likely causing resource
2024 Dec 12
1
Cores hang when calling mcapply
Hi Gregg. Just wanted to follow up on the solution you proposed. I had to make some adjustments to get exactly what I wanted, but it works, and takes about 15 minutes on our server configuration: temp <- ??????open_dataset( ????????????sources = input_files, ????????????format = 'csv', ????????????unify_schema = TRUE, ????????????col_types = schema( ????????????"ID_Key"
2024 Dec 12
1
Cores hang when calling mcapply
Hi Thomas, Glad to hear the suggestion helped, and that switching to a `data.table` approach reduced the processing time and memory overhead?15 minutes for one of the smaller datasets is certainly better! Sounds like the adjustments you devised, especially keeping the multicore approach for `make_clean_names()` and ensuring that `ID_Key` values remain intact, were the missing components you
2024 Dec 11
1
Cores hang when calling mcapply
About to try this implementation. As a follow-up, this is the exact error: Lost warning messages Error: no more error handlers available (recursive errors?); invoking 'abort' restart Execution halted Error: cons memory exhausted (limit reached?) Error: cons memory exhausted (limit reached?) Error: cons memory exhausted (limit reached?) Error: cons memory exhausted (limit reached?)
2010 Feb 27
1
New Variable from Several Existing Variables
I am new to R, but have been using SAS for years. In this transition period, I am finding myself pulling my hair out to do some of the simplest things. An example of this is that I need to generate a new variable based on the outcome of several existing variables in a data row. In other words, if the variable in all three existing columns are "Yes", then then the new variable should
2009 Jun 15
2
Help with syntax error
Hi, I have written boxplot commands of this form before, but I don''t quite understand why the function call is reporting a syntax error in this instance. All parameters passed to the function are strings. Thanks in advance. Payam > simplevar <- function(wframe,column1,column2) { + tframe <- get(wframe) + x1 <- which(names(wframe)==column1) + x2 <-
2006 Jun 07
4
Question: coding protected methods
Apologies first, because I need to ramp up on Ruby and coding Ruby in Rails, however it''s my 3rd day with this beast :) so I''m asking : When I added protected methods to the model before it was like: protected method.................... end Would this be a valid way to write a protected method as well ?: attr_protected :column1, :column2 Perhaps this particular call
2024 Dec 11
1
Cores hang when calling mcapply
How is the server configured to handle memory distribution for individual users. I see it has over 700GB of total system memory, but how much can be assigned it each individual user? AAgain - just curious, and wondering how much memory was assigned to your instance when you were running R. regards, Gregg On Wednesday, December 11th, 2024 at 9:49 AM, Deramus, Thomas Patrick <tderamus at
2009 Jun 17
6
script help
Hi ? I have a file. list.txt (two columns) ? column1??? column2 name??????? address ? ? I need to put in the letter file letter.txt eg: ? Dear: Chloe Address: CA ? Can I use this ? for i `cat list.txt` | sed 's/Chloe/$i.1; /CA/$i.2/g' $i.letter.txt ? Thank you for your help ? ? ? ? ? __________________________________________________________________ Looking for the perfect gift?
2013 Mar 21
2
Displaying median value over the horizontal(median)line in the boxplot
Hi, set.seed(45) test1<-data.frame(columnA=rnorm(7,45),columnB=rnorm(7,10)) #used an example probably similar to your actual data apply(test1,2,function(x) sprintf("%.1f",median(x))) #columnA columnB # "44.5"? "10.2" par(mfrow=c(1,2)) lapply(test1,function(x) {b<-
2004 Oct 25
2
Reading sections of data files based on pattern matching
I am about to write general functions to read the output of simulations models. These model generate output files with different sections which I want to analyze plot etc. Since this will be used many people at the department I wanted to make sure that will do this in the best way. For instance I want to read a snippets of data from a text that look like this.
2024 Dec 11
1
Cores hang when calling mcapply
Thomas, I'm curious - what OS are you running this on, and how much memory does the computer have?? Let me know if that code worked out as I hoped. regards, gregg On Wednesday, December 11th, 2024 at 6:51 AM, Deramus, Thomas Patrick <tderamus at mgb.org> wrote: > About to try this implementation. > > As a follow-up, this is the exact error: > > Lost warning
2024 Dec 11
1
Cores hang when calling mcapply
It's Redhat Enterprise Linux 9 Specifically: OS Information: NAME="Red Hat Enterprise Linux" VERSION="9.3 (Plow)" ID="rhel" ID_LIKE="fedora" VERSION_ID="9.3" PLATFORM_ID="platform:el9" PRETTY_NAME="Red Hat Enterprise Linux 9.3 (Plow)" ANSI_COLOR="0;31" LOGO="fedora-logo-icon"
2006 Apr 06
1
reshape question
Hi, I have a data fram like this: date column1 column2 column3 value1 value2 value3 1-1 A B C 10 5 2 2-1 A B D 5 2 0 3-1 A B E 17 10 7 How can I reshape it to: date column1 column2 column3 v x 1-1 A B C value1 10 1-1 A B C value2 5 1-1 A B C value3 2 2-1 A B D value1 5 2-1 A B D value2 2 2-1 A B D value3 0 3-1 A B E value1 17 3-1 A B E value2 10 3-1 A B E value3 7 Thx! Regards, Richard