search for: read_csv

Displaying 20 results from an estimated 29 matches for "read_csv".

2018 Jan 02
1
httr::content without message
Thanks to all that replied. I had just looked through the httr code and sure enough for a .csv mime time it calls readr::read_csv(). The httr::content docs suggest not using automatic parsing in a package, rather to determine mime type and parse yourself and Ben's suggestion also works if I do: junk <- readr::read_csv(r1$content, col_types = cols()) Perfect. Using httr rather than putting the url in any of the rea...
2024 Apr 16
5
read.csv
...ewhat unexpected behaviour of read.csv() which is trivial but worthwhile to note -- my data involves a protein named "1433E" but to save 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))...
2018 Jan 02
0
httr::content without message
Ahoy! That's a message generated by the readr::read_table() function (or it's friends). You can suppress it a number of ways, but this should work as httr::content() will pass through arguments, like col_types = cols(), to the file reader. junk <- httr::content(r1, col_types = cols()) See more here... https://blog.rstudio.com/2016/08/05/readr-1-0-0/
2024 Apr 16
1
read.csv
...read.csv() which is trivial but worthwhile to note -- my data involves a protein named "1433E" but to save 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&...
2024 Apr 16
1
read.csv
...read.csv() which is trivial but worthwhile to note -- my data involves a protein named "1433E" but to save 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&quot...
2024 Apr 16
1
read.csv
...f read.csv() which is trivial but worthwhile to note -- my data involves a protein named "1433E" but to save 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&quo...
2024 Apr 08
1
Exceptional slowness with read.csv
data.table's fread is also fast. Not sure about error handling. But I can merge 300 csvs with a total of 0.5m lines and 50 columns in a couple of minutes versus a lifetime with read.csv or readr::read_csv On Mon, 8 Apr 2024, 16:19 Stevie Pederson, <stephen.pederson.au at gmail.com> wrote: > Hi Dave, > > That's rather frustrating. I've found vroom (from the package vroom) to be > helpful with large files like this. > > Does the following give you any better luck? &...
2018 Jan 02
4
httr::content without message
Hi All: I am using httr to download files form a service, in this case a .csv file. When I use httr::content on the result, I get a message. Since this will be in a package. I want to suppress the message, but haven't figured out how to do so. The following should reproduce the result: myURL <-
2017 Sep 04
1
Dataframe Manipulation
...m") On 31 August 2017 at 13:17, Ulrik Stervbo <ulrik.stervbo at gmail.com> wrote: > Hi Hemant, > > the solution is really quite similar, and the logic is identical: > > library(readr) > library(dplyr) > library(stringr) > library(tidyr) > > data_help <- read_csv("data_help.csv") > cat_help <- read_csv("cat_help.csv") > > # Helper function to split the Items and create a data_frame > split_items <- function(items){ > x <- items$Items_purchased_on_Receipts %>% > str_split(pattern = ",") %>%...
2017 Aug 31
0
Dataframe Manipulation
Hi Hemant, the solution is really quite similar, and the logic is identical: library(readr) library(dplyr) library(stringr) library(tidyr) data_help <- read_csv("data_help.csv") cat_help <- read_csv("cat_help.csv") # Helper function to split the Items and create a data_frame split_items <- function(items){ x <- items$Items_purchased_on_Receipts %>% str_split(pattern = ",") %>% unlist(use.names = FALSE...
2012 May 25
4
Reading a bunch of csv files into R
Dear R users I am struggling from a data importing issue: I have some hundreds of csv files needed to be read into R for futher analysis. All those csv files are named in one of the three formats: (1) strings: e.g. London_Oxford street (2) Integer: e.g. 1234_5678 (3) combined: e.g. London_1234 I intend to use read.csv("xxxx_xxx.csv") but I only dealt with sigle documents before and
2017 Jun 28
4
Extraneous full stop in csv read
I ran into a puzzling minor behaviour I would like to understand. Reading in a csv file, I find an extraneous "." after a column header, "in" [short for "inches"] thus, "in.". Is this due to "in" being reserved? I initially blamed this on RStudio or to processing the data through LibreCalc. However, the same result occurs in a console R session.
2017 Aug 30
1
Dataframe Manipulation
by using these two tables we have to create third table in this format where categories will be on the top and transaction will be in the rows, On 30 August 2017 at 16:42, Hemant Sain <hemantsain55 at gmail.com> wrote: > Hello Ulrik, > Can you please once check this code again on the following data set > because it doesn't giving same output to me due to absence of quantity,a
2016 Aug 05
2
¿Qué hace as.numeric()?
...esto no hay nada mejor que nos pases una parte representativa del conjunto de datos. Además de lo ya expuesto, se pueden utilizar otras alternativas de lectura del fichero a la de "read.table()", por ejemplo la que ofrece "fread()" del paquete "data.table" o la "read_csv()" del paquete "readr". En los que no hace falta declarar a priori el tipo de cada columna ya que automática los infieren de una lectura inicial (200-300 líneas). Gracias, Carlos Ortega www.qualityexcellence.es El 5 de agosto de 2016, 5:04, <javier.ruben.marcuzzi en gmail.com&gt...
2020 Nov 26
1
Error CLUSTER : no se puede ubicar un vector de tamaño 1.7 gb
...r de tama?o 1,7 Gb?. Adem?s, Busque un poco en internet sobre unas librer?as para realizar el algoritmo de matriz de distancias, sin embargo, me arroja diferentes errores y despu?s me vuelve a mostrar el mismo error del tama?o del vector abajo el C?digo de la Librer?a. Library(factorextra) df = read_csv(?ruta?) mtrx.dist = scale(df[,1:2]) fviz_dist(mtrx.dist, gradient = list(low = "blue", mid = "white", high = "red")) Error in fviz_dist(mtrx.dist, gradient = list(low = "blue", mid = "white", : no se pudo encontrar la funci?n "fviz_dist&quo...
2017 Aug 14
2
tidyverse repeating error: "object 'rlang_mut_env_parent' not found"
...------------------------------- filter(): dplyr, stats lag(): dplyr, stats Desktop> library(magrittr) Attaching package: ?magrittr? The following object is masked from ?package:purrr?: set_names The following object is masked from ?package:tidyr?: extract Desktop> Test <- read_csv("Test.csv") Parsed with column specification: cols( Tests1 = col_character(), Tests2 = col_character(), X1 = col_integer(), X2 = col_integer(), Result = col_double() ) Desktop> Test # A tibble: 15 x 5 Tests1 Tests2 X1 X2 Result <chr> <chr> <int&gt...
2018 Jan 27
0
GAM: mismatch between nb/polys supplied area names and data area names
...variable types for area names in nb and data, but have not been successful. Any advice would be appreciated. Below are code and a data sample. Thank you, Susan code: #read in data; from a numeric polygon "IDENTIFIER" create a new polygon "id" that is a factor datawide <- read_csv("~/Long/ALLWIDEDATA.csv") datawide <- transform(datawide, id = factor(formatC(IDENTIFIER, width = 2, flag = "0"))) #NB: the new area ids are: "01", "02",..."50" #read in the shapefile and create the neighborhood object nb, #names(nb) must corres...
2017 Aug 14
0
tidyverse repeating error: "object 'rlang_mut_env_parent' not found"
...dplyr, stats > Desktop> library(magrittr) > > Attaching package: ?magrittr? > > The following object is masked from ?package:purrr?: > > set_names > > The following object is masked from ?package:tidyr?: > > extract > > Desktop> Test <- read_csv("Test.csv") > Parsed with column specification: > cols( > Tests1 = col_character(), > Tests2 = col_character(), > X1 = col_integer(), > X2 = col_integer(), > Result = col_double() > ) > Desktop> Test > # A tibble: 15 x 5 > Tests1 Tests2 X1...
2016 Sep 26
3
Concatenación de tablas
Buenas Tardes, Les escribo para solicitarles una ayuda dado que tengo 2 tablas, una con los campos: cedula | nombre | direccion y la otra con la tabla: cedula | barrio | municipio Lo que necesito es hacer una comparación del campo cedula de las dos tablas y si son iguales, agregarle los campos barrio y municipio de la segunda tabla a la fila correspondiente de esa cedula de la primera
2018 Apr 16
5
Help with R-Calling forth csv.
Hi, I'm working on R trying to find a distribution that fits data from a csv file. The csv contains data on pressure exerted by a certain vehicle in terms of pressure [kPa] and I have around 3000 data points. I want to call forth this csv and by using (fitdistr) or if you could recommend a function to use, get a plot of my csv and the distributions I can compare it to (Weibull, chi, beta,