search for: all_data

Displaying 18 results from an estimated 18 matches for "all_data".

Did you mean: call_data
2011 Nov 23
2
zeros to NA's - faster
Hello, Is there a faster way to do this? Basically, I'd like to NA all values in all_data if there are no 1's in the same column of the other matrix, iu. Put another way, I want to replace values in the all_data columns if values in the same column in iu are all 0. This is pretty slow for me, but works: all_data = matrix(c(1:9),3,3) colnames(all_data) = c('a','b',...
2024 Apr 16
5
read.csv
...space I drop the quote so it becomes, Gene,SNP,prot,log10p YWHAE,13:62129097_C_T,1433E,7.35 YWHAE,4:72617557_T_TA,1433E,7.73 Both read.cv() and readr::read_csv() consider prot(ein) name as (possibly confused by scientific notation) numeric 1433 which only alerts me when I tried to combine data, all_data <- data.frame() for (protein in proteins[1:7]) { cat(protein,":\n") f <- paste0(protein,".csv") if(file.exists(f)) { p <- read.csv(f) print(p) if(nrow(p)>0) all_data <- bind_rows(all_data,p) } } proteins[1:7] [1] "1433B" &...
2008 Sep 05
1
boxplot including null info from dataframe, not with SQLite dataframe
...e database, and then used RSQLite to load the data into R. The fields of interest are controller, action and total_time: controller and action have string values; total_time has a decimal value. I first did the following box plot to find the problem controllers. boxplot(total_time ~ controller, all_data) Having identified one controller of interest (let's say "BadController"), I then wanted to then focus on the actions associated with that controller. So I did this: boxplot(total_time ~ action, subset(all_data, controller == "BadController")) This gave me a plot I was...
2008 Dec 08
2
Permutation exact test to compare related series
I all, is there a way with R to perform an exact permutation test to replace the wilcoxon test to compare paired series and/or to perform pairwise multiple comparisons for related series after a Friedman test ? Thanks Gilles
2024 Apr 16
1
read.csv
...gt; > Gene,SNP,prot,log10p > YWHAE,13:62129097_C_T,1433E,7.35 > YWHAE,4:72617557_T_TA,1433E,7.73 > > Both read.cv() and readr::read_csv() consider prot(ein) name as (possibly confused by scientific notation) numeric 1433 which only alerts me when I tried to combine data, > > all_data <- data.frame() > for (protein in proteins[1:7]) > { > cat(protein,":\n") > f <- paste0(protein,".csv") > if(file.exists(f)) > { > p <- read.csv(f) > print(p) > if(nrow(p)>0) all_data <- bind_rows(all_d...
2024 Apr 16
1
read.csv
..., > > Gene,SNP,prot,log10p > YWHAE,13:62129097_C_T,1433E,7.35 > YWHAE,4:72617557_T_TA,1433E,7.73 > > Both read.cv() and readr::read_csv() consider prot(ein) name as (possibly confused by scientific notation) numeric 1433 which only alerts me when I tried to combine data, > > all_data <- data.frame() > for (protein in proteins[1:7]) > { > cat(protein,":\n") > f <- paste0(protein,".csv") > if(file.exists(f)) > { > p <- read.csv(f) > print(p) > if(nrow(p)>0) all_data <- bind_rows(all_data,p)...
2016 Apr 04
0
Does this code execute the bagging correctly ?!
Hello the code : set.seed(10) y<-c(1:1000) x1<-c(1:1000)*runif(1000,min=0,max=2) x2<-c(1:1000)*runif(1000,min=0,max=2) x3<-c(1:1000)*runif(1000,min=0,max=2) lm_fit<-lm(y~x1+x2+x3) summary(lm_fit) set.seed(10) all_data<-data.frame(y,x1,x2,x3) positions <- sample(nrow(all_data),size=floor((nrow(all_data)/4)*3)) training<- all_data[positions,] testing<- all_data[-positions,] lm_fit<-lm(y~x1+x2+x3,data=training) predictions<-predict(lm_fit,newdata=testing) error<-sqrt((sum((testing$y-prediction...
2018 Jan 15
0
sum multiple csv files
...he final data frame should have the same") is that you do not yet understand the difference between matrices and data frames ([4]), and you want to perform matrix (element-wise) addition. This would require that you convert the data frames read in by read.csv into matrices before adding them: All_data <- lapply(filenames ,function(i){ ###read cvs files and add the row and column names to each data frame ### as.matrix( read.csv(i, header=FALSE, sep = "", col.names = col_names, row.names = row_names) }) result <- Reduce( `+`, All_data ) This will fail if any of the values in you...
2011 Aug 29
1
How to order based on the second two columns?
...ta frame is called "all". "data" is another data frame that has all data but I want to put together some important columns from my original data frame (data) into another data frame (all) as follows and I would like them to be sorted based on the id1 and id2. Here is what I do: all_data = cbind(oder(data[,2]), order(data[,3]), data[,1], pred) all = as.data.frame(all_data) colnames(all) = c("id1", "id2", "y" , "pred") when I do the ordering thing, I am not sure why I do not get the corresponding "y" and "pred" values for...
2018 Jan 15
4
sum multiple csv files
...eciatte very much your help to solve my problem. I have 40 csv files that have the same structure, and I want to merge them into a single data frame. I already have load and combined all the cvs files into a large list, and I created two filenames <- list.files('data',full.names=TRUE) All_data <- lapply(filenames,function(i){ ###read cvs files and add the row and column names to each data frame### read.csv(i, header=FALSE, sep = "", col.names = col_names, row.names = row_names) }) However I would like to sum the rows of cvs files to get a single data frame (each cvs fi...
2024 Apr 16
1
read.csv
...gt; > Gene,SNP,prot,log10p > YWHAE,13:62129097_C_T,1433E,7.35 > YWHAE,4:72617557_T_TA,1433E,7.73 > > Both read.cv() and readr::read_csv() consider prot(ein) name as (possibly confused by scientific notation) numeric 1433 which only alerts me when I tried to combine data, > > all_data <- data.frame() > for (protein in proteins[1:7]) > { > cat(protein,":\n") > f <- paste0(protein,".csv") > if(file.exists(f)) > { > p <- read.csv(f) > print(p) > if(nrow(p)>0) all_data <- bind_rows(all_data,p) >...
2024 Feb 29
1
R 4.3.3 is released
The build system rolled up R-4.3.3.tar.gz and .xz (codename "Angel Food Cake") this morning. This is a minor update, intended as the wrap-up release for the 4.3.x series. This also marks the 6th anniversary of R-1.0.0. (2000-02-29) The list below details the changes in this release. You can get the source code from https://cran.r-project.org/src/base/R-4/R-4.3.3.tar.gz
2024 Feb 29
1
R 4.3.3 is released
The build system rolled up R-4.3.3.tar.gz and .xz (codename "Angel Food Cake") this morning. This is a minor update, intended as the wrap-up release for the 4.3.x series. This also marks the 6th anniversary of R-1.0.0. (2000-02-29) The list below details the changes in this release. You can get the source code from https://cran.r-project.org/src/base/R-4/R-4.3.3.tar.gz
2024 Feb 29
1
R 4.3.3 is released
The build system rolled up R-4.3.3.tar.gz and .xz (codename "Angel Food Cake") this morning. This is a minor update, intended as the wrap-up release for the 4.3.x series. This also marks the 6th anniversary of R-1.0.0. (2000-02-29) The list below details the changes in this release. You can get the source code from https://cran.r-project.org/src/base/R-4/R-4.3.3.tar.gz
2009 Dec 11
3
Please help with a basic function
Hello, I am learning how to use functions, but I'm running into a roadblock. I would like my function to do two things: 1) convert an object to a dataframe, 2) and then subset the dataframe. Both of these commands work fine outside the function, but I would like to wrap them in a function so I can apply the code iteratively to many such objects. Here's what I wrote, but it doesn't
2010 Jul 16
2
invalid factor level, NAs generated
...in a directory that I am reading into R and row binding together. I am using the following code to do so: # Directory where files are found my.txt.file.directory <- "C:/Jared/Data/Kenya/Wildebeest/Tracking_Data" names.of.txt.files <- list.files(my.txt.file.directory,pattern="all_data",ignore.case=TRUE, full.names=TRUE) # Print names that meet criteria in directory names.of.txt.files # The names.of.txt.files will be a vector with the names of all the txt files # Dataset will contain all the data in the directory wildebeest <- NULL # Run loop for (i in 1:length(names.of...
2012 Aug 17
5
Hiera, Hashes, and Create_resources
Howdy: I need some help please to get hiera configuration data derived from YAML, thru puppet. I have studied Internet search results and puppet documentation on create_resources and custom defines but need a little help along. I can print out the YAML from variables, arrays, and, finally, hashes too from a puppet manifest. One thing that is stumping me is how to access from the custom define
2010 Dec 10
2
has_many, conditions overrride
I have a prod site that has: has_many :data, :conditions => {:aasm => ''active'') I do not want to modify it as I do not want to break existing functionality Is there a way to overrride this at runtime? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to