search for: read_excel

Displaying 20 results from an estimated 26 matches for "read_excel".

2024 Jan 30
1
R interpreting numeric field as a boolean field
If you are using the read_excel() function from the readxl package, then there's an argument named col_types that lets you specify the types to use. You could specify col_types = "numeric" to read all columns as numeric columns. If some columns are different types, you should specify a vector of type names, wit...
2024 Jan 30
1
R interpreting numeric field as a boolean field
...ws total), I cannot change the data type from boolean to numeric. I tried doing dataset$my_field = as.numeric(dataset$my_field), I also tried to do dataset <- dataset[complete.cases(dataset), ], didn't work either. The only thing that worked for me was to take a single sheed and through the read_excel function use the guess_max parameter and set it to a sufficiently large number (a number >= to the total amount of the full merged dataset). I want to automate the merging of the N number of Excel sheets so that I don't have to be manually doing it. Unless there is a way to accomplish someth...
2016 Nov 18
2
problem with normalizePath()
...ta/OCPH/EPI/BHSDM/Group/17.xls": >> The system cannot find the file specified >> >> Here's my session: >> >> library(readxl) library(XLConnect) >> >> # attempting to read file from network drive df1 <- >> read_excel("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls") >> # pathname is fully qualified, but error thrown as above >> >> cat(normalizePath("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls")) >> # throws same error >> >> # rea...
2024 Jan 30
1
R interpreting numeric field as a boolean field
...g R version 4.3.2, and I have a > .xlsx file that has 46 sheets on it. I basically combined all 46 sheets > and read them as a single dataframe in R using package rio. > > I read a solution using package readlx, as suggested in a StackOverflow > discussion as follows: > df <- read_excel(path = filepath, sheet = sheet_name, guess_max = 100000). > Now, when you have so many sheets (46 in my case) in an Excel file, the rio > methodology is more practical. > > This is what I did: > path = > "C:/Users/myuser/Documents/DataScienceF/Forecast_and_Econometric_Analys...
2016 Nov 30
1
problem with normalizePath()
...Michael.Laviolette at dhhs.nh.gov> wrote: > In researching another issue, I discovered a workaround: the network drive > folder needs to be mapped to the local PC. > > setwd("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/Michael Laviolette/Stat > tools") > df1 <- readxl::read_excel("addrlist-4-MikeL.xls", 2) > # fails, throws same error > df2 <- readxl::read_excel("Z:/Stat tools/addrlist-4-MikeL.xls", 2) # > works > > -----Original Message----- > From: Martin Maechler [mailto:maechler at stat.math.ethz.ch] > Sent: Fri...
2016 Nov 17
2
problem with normalizePath()
...functions that don't call normalizePath(). The error thrown is Error: path[1]="\\Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls": The system cannot find the file specified Here's my session: library(readxl) library(XLConnect) # attempting to read file from network drive df1 <- read_excel("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls") # pathname is fully qualified, but error thrown as above cat(normalizePath("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls")) # throws same error # reading same file with different function df2 <- readWorksheetFromFile("/...
2024 Jan 30
1
R interpreting numeric field as a boolean field
...; boolean to numeric. I tried doing dataset$my_field = >> as.numeric(dataset$my_field), I also tried to do dataset <- >> dataset[complete.cases(dataset), ], didn't work either. >> >> The only thing that worked for me was to take a single sheed and through >> the read_excel function use the guess_max parameter and set it to a >> sufficiently large number (a number >= to the total amount of the full >> merged dataset). I want to automate the merging of the N number of Excel >> sheets so that I don't have to be manually doing it. Unless there is...
2016 Nov 30
0
problem with normalizePath()
In researching another issue, I discovered a workaround: the network drive folder needs to be mapped to the local PC. setwd("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/Michael Laviolette/Stat tools") df1 <- readxl::read_excel("addrlist-4-MikeL.xls", 2) # fails, throws same error df2 <- readxl::read_excel("Z:/Stat tools/addrlist-4-MikeL.xls", 2) # works -----Original Message----- From: Martin Maechler [mailto:maechler at stat.math.ethz.ch] Sent: Friday, Novembe...
2024 Jan 30
1
R interpreting numeric field as a boolean field
.... I tried doing dataset$my_field = >>> as.numeric(dataset$my_field), I also tried to do dataset <- >>> dataset[complete.cases(dataset), ], didn't work either. >>> >>> The only thing that worked for me was to take a single sheed and through >>> the read_excel function use the guess_max parameter and set it to a >>> sufficiently large number (a number >= to the total amount of the full >>> merged dataset). I want to automate the merging of the N number of Excel >>> sheets so that I don't have to be manually doing it. Unl...
2023 Mar 31
1
Extraer texto de una columna en Excel
...entre textura/s hasta el punto final. Ejemplo: *Moderadamente profundos, bien drenados, de textura franco arenosa a franco arcillo arenosa. Fertilidad natural media* Lo que quiero extraer sería: *franco arenosa a franco arcillo arenosa * Al final lo pude realizar de la siguiente manera: df <- read_excel("Agrologia.xlsx") df$Extracted_Text <- trimws(str_extract(df$CARACTERIS, "(?<=textura?(?:[^a-zA-Z]|s)).*?(?=\\.)")) Estoy abierto a cualquier sugerencia o comentario. Muchas gracias. On Fri, 31 Mar 2023 at 12:03, Carlos Ortega <cof en qualityexcellence.es> wrote:...
2023 Mar 31
1
Extraer texto de una columna en Excel
...> Ejemplo: > *Moderadamente profundos, bien drenados, de textura franco arenosa a > franco arcillo arenosa. Fertilidad natural media* > Lo que quiero extraer sería: *franco arenosa a franco arcillo arenosa * > > Al final lo pude realizar de la siguiente manera: > > df <- read_excel("Agrologia.xlsx") > > df$Extracted_Text <- trimws(str_extract(df$CARACTERIS, > "(?<=textura?(?:[^a-zA-Z]|s)).*?(?=\\.)")) > > Estoy abierto a cualquier sugerencia o comentario. > > Muchas gracias. > > On Fri, 31 Mar 2023 at 12:03, Carlos Ortega &...
2017 Nov 17
3
Dataframe is character
...ric" etc My syntax (I think I cannot send the excel file as binary?) > library(readxl) > library(readxl) > library(metafor) > setwd("C:/docs/Work2/Statistic_Analyses/MetaQTcAD") > getwd() [1] "C:/docs/Work2/Statistic_Analyses/MetaQTcAD" > > dat <- read_excel("Hedges-g_QTc MA_R05.xlsx", sheet = 2, col_names=TRUE, col_types = c("guess")) > class("dat") [1] "character" > class("yi") [1] "character" > [[alternative HTML version deleted]]
2024 Apr 15
2
Synthetic Control Method
...R. For this purpose, I created the following code: # Re-load packages library(Synth) library(readxl) # Pfadeinstellung Excel-Blatt excel_file_path <- ("C:\\Users\\xxxxx\\Desktop\\DATA_INVESTMENTVOLUMEN_FOR_R_WITHOUT_NA.xlsx") # Load the Excel file INVESTMENTVOLUME <- read_excel(excel_file_path) # Anzeigen des gesamten Dataframes print(INVESTMENTVOLUME) # Make sure BFS is numeric right before dataprep INVESTMENTVOLUME$BFS <- as.numeric(INVESTMENTVOLUME$BFS) # running dataprep dataprep_out <- dataprep( foo = INVESTMENTVOLUME, predictors = c(&quot...
2016 Apr 27
0
R Script Template
The subject of your email is missing. Perhaps you need to read the Posting Guide (again?) about attachments. Embedding your example directly in the body of the email is generally more accessible in archives than attaching it. -- Sent from my phone. Please excuse my brevity. On April 27, 2016 1:14:17 PM GMT+01:00, G.Maubach at gmx.de wrote: >Hi All, > >I am addressing this post to all
2016 Nov 17
0
problem with normalizePath()
...error thrown is > > Error: path[1]="\\Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls": The > system cannot find the file specified > > Here's my session: > > library(readxl) > library(XLConnect) > > # attempting to read file from network drive > df1 <- read_excel("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls") > # pathname is fully qualified, but error thrown as above > > cat(normalizePath("//Hzndhhsvf2/data/OCPH/EPI/BHSDM/Group/17.xls")) > # throws same error > > # reading same file with different function > df2 &l...
2023 May 07
0
meta
...imado Gracias por su ayuda José 2023-05-06 19:47 GMT-04:00, Carlos Ortega <cof en qualityexcellence.es>: > Hola, > > Si añades lo que destaco, defines el layout y queda más ajustado en la > pantalla. > > #-------------------------- > library(readxl) > Sistolica <- read_excel("./Sistolica1.xlsx") > library(meta) > m <- metacont( > Ne, Me, Se, Nc, Mc, Sc, > data = Sistolica, > studlab = paste(Author, year), > * layout = "RevMan5", common = FALSE* > ) > >...
2016 Apr 27
2
R Script Template
Hi All, I am addressing this post to all who are new to R. When learing R in the last weeks I took some notes for myself to have code snippets ready for the data analysis process. I put these snippets together as a script template for future use. Almost all of the given command prototypes are tested. The template script contains snippets for best practices and leaves out the commands that
2017 Nov 17
0
Dataframe is character
...e excel file as binary?) > > > library(readxl) > > library(readxl) > > library(metafor) > > setwd("C:/docs/Work2/Statistic_Analyses/MetaQTcAD") > > getwd() > [1] "C:/docs/Work2/Statistic_Analyses/MetaQTcAD" > > > > > dat <- read_excel("Hedges-g_QTc MA_R05.xlsx", sheet = 2, col_names=TRUE, > col_types = c("guess")) > > class("dat") > [1] "character" > > class("yi") > [1] "character" > > > > [[alternative HTML version deleted]] > &gt...
2017 Dec 26
1
Time Series with Neural Networks
...blem is that I couldn?t 24 for output here. How can I make such forecast? And my MASE score (6.95 in the Test set) is not good. Could be related to shortness of training set? The Code: library(zoo) library(readxl) setwd("C:/Users/emrek/Dropbox/2017-2018 Master Thesis/DATA") epias <- read_excel("eski.epias.xlsx") nPTF <- epias$`PTF (TL/MWh)` nSMF<- epias$`SMF(TL/MWh)` nC<- epias$`TT(MWh)` nEAK<- epias$`EAK-Toplam (MWh)` nTP<- epias$`Toplam (MWh)` times <- seq(from=as.POSIXct("2015-12-18 00:00:00"), to=as.POSIXct("2017-10-24 23:00:00")...
2017 Jun 29
2
Change Rcode for a meta-analysis(netmeta) to use a random effects model instead of a mixed effects model
...modalities of a distal radius fracture. I have a code to compare the complication and reoperation rates. Currently it is using a mixed effects model. Is it possible to change the code so a random effects model is used? Thank you very much, Jay R code library(meta) library(readxl) All <- read_excel("Basics excel file complication and reoperation rate.xlsx", sheet=1) names(All) <- c("Study_ID","Event_Type","Treatment","Events_n","N","nN") All$Treatment <- factor(All$Treatment, levels=c("PC","EF",&qu...