search for: csv's

Displaying 20 results from an estimated 4992 matches for "csv's".

Did you mean: csi's
2011 Sep 09
3
Read a list of files into named R data.frames
I have a collection of .csv files in a directory, and want to read them into R data.frames whose names are the same as the file names, without the .csv extension e.g., from > (files <- list.files(pattern="*.csv")) [1] "Allstar.csv" "AllstarFull.csv" [3] "Appearances....
2010 Feb 10
4
Readjusting the OUTPUT csv file
Dear R helpers   I have some variables say ABC, DEF, PQR, LMN and XYZ. I am choosing any three varaibles at random at a time for my analysis and name these files as input1.csv, input2.csv and input3.csv. So if I choose variables say ABC, DEF and PQR, I am passing the specifications of these variables to input1.csv, input2.csv and input3.csv respectively.   This means in another case even if I choose say LMN, DEF and XYZ in this order, then my input1.csv will have detail...
2009 Dec 21
2
Reading multiple Input Files
...ing for my analysis is random i.e. it can be 2, can be 10 or even higher. The R-code I had written (with the guidance of R helpers obviously and I am really grateful to all of you) as of now is sort of hard coding when it comes to reading interest rates as an input e.g.   ## INPUT   rate_1   = read.csv('rate1_range.csv') rate_2   = read.csv('rate2_range.csv') rate_3   = read.csv('rate3_range.csv') rate_4   = read.csv('rate4_range.csv')   prob_1   = read.csv('rate1_probs.csv') prob_2   = read.csv('rate2_probs.csv') prob_3   = read.csv('rate3_prob...
2010 Dec 23
5
Writing a single output file
...------------------------------------------------------------------------ I have a process which generates number of outputs. The R code for the same is as given below. for(i in 1:n)   {                                                                                                         write.csv(output[i], file = paste("output", i, ".csv", sep = ""), row.names = FALSE)                                                                     } Depending on value of 'n', I get different output files. Suppose n = 3, that means I am having three output csv...
2012 Feb 16
2
how to rbind matrices from different loops
...finish this loop in a logical way. I would like to find the unique ids for group 1, group 2, etc., and rbind these back together. However, I am unclear how to do this because in other attempts my final product is always a part of the last run loop. My way of working around this has been to write.csv and then re read at the end, which is so clumsy. Previously, I have used a store matrix for individual cells. 1. Is there a better way to approach this? 2. How can I combine parts of matrices to other parts created in prior loops? I have created a primitive example below. Each of the groups vari...
2024 Feb 19
5
Looping
I need to read csv files repeatedly, named data1.csv, data2.csv,? data24.csv, 24 altogether. That is, data<-read.csv(?data1.csv?) ? data<-read.csv(?data24.csv?) ? Is there a way to do this in a loop? Thank you. Steven from iPhone [[alternative HTML version deleted]]
2010 Feb 19
1
How to use same function for diffrent input values
...al code I have pasted at the end of mail) like say   indiv_rate = function(n, rate_name, rate, rate_rf1, rate_rf2, rate_rf3, rateprob1, rateprob2, rateprob3) { ........some R commands   return(data.frame(rate_name, rates = round(rate_data, digits = 4)))   }   ## INPUT   rates = indiv_rate(n = read.csv('number.csv')$n, rate_name = read.csv('rate.csv')$rate_name, rate = read.csv('rate.csv')$rate, rate_rf1 = read.csv('rate_rf.csv')$rate_rf1,                          rate_rf2 = read.csv('rate_rf.csv')$rate_rf2, rate_rf3 = read.csv('rate_rf.csv')$rate_...
2007 May 18
3
ordering in list.files
Hi R, My csv files are stored in the order, '1abc.csv', '2def.csv', '3ghi.csv', '10files.csv' in a folder. When I read this into R from list.files (R command: x=list.files("Z:/CSV/fold",full.names=F), I don't get the same order, instead I get the order as "10fi...
2009 Dec 28
2
Modified R Code
Dear R helpers,   I have following input files. (Actually they are more than 10 rates but here i am considering only 2 rates to write my problem)   rate1.csv min1        max1            min2          max2          min3           max3 1.05        1.30               1.30          1.65             1.65          1.99   rate2.csv min1        max1            min2          max2          min3           max3 2.05        2.30               2.30          2.65     ...
2005 Oct 11
3
Reading # in file with read.csv
I'm using read.csv to read in a csv file containing '#' characters. For example, say I'm reading the following file (test.csv): var1,var2,var3 a,b,c d,e#,f g,h,i It outputs: > read.csv("Raw Data\\test.csv") var1 var2 var3 1 a b c 2 d e 3 g h i Warning message: in...
2010 Apr 16
2
Scanning only specific columns into R from a VERY large file
...again for help. You've never let me down! (1) Please make the following toy files: x <- read.table(textConnection("var.1 var.2 var.3 var.1000 indv.1 1 5 9 7 indv.210000 2 9 3 8"), header = TRUE) y <- read.table(textConnection("var.3 var.1000"), header = TRUE) write.csv(x, file = "x.csv") write.csv(y, file = "y.csv") (2) Pretend you are starting with the files "x.csv" and "y.csv." They come from another source -- an online database. Pretend that these files are much, much, much larger. Specifically: (a) Pretend that &q...
2000 Dec 15
1
Samba 2.0.7 - mangled names problems
Hello, after upgrade Samba from 1.9.17p4 to 2.0.7 I have problems with name mangling. Changed parameters in SMB.CONF for new version: oplocks = no client code page = 852 local master = yes all other parameters are the same. I one directory I have these files: 0011_BAR_ISSUEAGRES.CSV 0011_MIR_STKGEN.CSV 0011_OLO_ISSUEMPSPEC.CSV 0011_RET_ISSUEAGRES.CSV When I look to these files (DIR /X) from Windows95 or Windows NT Workstation clients I can see this: 0010_~GD.CSV 0010_BAR_ISSUECOMB.CSV 0010_~B4.CSV 0010_BAR_STKCOMB.CSV 0011_~%Y.CSV 0011_BAR_ISSUEAGRES.CSV 0011_~$%.CSV...
2010 Sep 23
3
import csv file problem
Hello, i am trying to import the csv file into R . i have a file saved as csv in my desktop. My laptop is Window vista, version R is 2.10.1. then i used the code > Q<-read.csv("Q.csv",header=TRUE) then my error is Error in file(file, "rt") : cannot open the connection In addition: Warning message: In fi...
2018 Apr 16
5
how to write a loop to repetitive jobs
Hi All.., I need to do the following repetitive jobs: seg71 <- read.csv("C:/Awork/geneAssociation/removed8samples/neuhausen71/seg.pr3.csv", head=T) seg71$id <-"sn71" seg72 <- read.csv("C:/Awork/geneAssociation/removed8samples/neuhausen72/seg.pr3.csv", head=T) seg72$id <-"sn72" seg73 <- read.csv("C:/Awork/geneAs...
2012 Sep 26
1
Ask for help - how to change WHIRR.117.csv to WHIRR_117.csv
Hi, I have a script below. dat <- read.table(file="pt.csv", header=T, sep=",", row.names=1, col.names=1) dat for(which_col in seq_len(ncol(dat))) { subset_data <- dat[,which_col:ncol(dat)] file_name <- sprintf('%s.csv', colnames(dat)[which_col]) write.csv(subset_data, file_name) message(sprintf('Sav...
2012 May 12
5
Help with writing data to csv
I am trying to write data to csv but I am having issues with the separations. Basically I have some results that I get with R that I copied and pasted into word and then saved as .txt I want to write the results to csv because it's easier to make tables in word (all I would have to do is copy and paste into a table, instea...
2012 Jul 10
3
Need HELP: how find and use a csv file?
Hey, I am having some problems with importing a csv file into R and then saving it for analyzing. I got a csv file ( skater.csv) which i could read by typing: read.csv(file="/Users/kama/Desktop/skatter.csv", header=TRUE, sep=";") However, when i enter: skatter.csv<-read.csv("skatter.csv", header=TRUE) i get...
2009 Dec 15
1
Changing Column names in (Output) csv file
...8]]  <- c(0.54,0.06,0.40) range_prob[[9]]  <- c(0.26,0.62,0.12) range_prob[[10]] <- c(0.65,0.19,0.16)   pdf <- expand.grid(range_prob)   data_lab$probs <- apply(pdf, 1, prod)   joint_probs = xtabs(probs ~ Var1 + Var2+Var3+Var4+Var5+Var6+Var7+Var8+Var9+Var10, data = data_lab)   write.csv(data.frame(joint_probs), 'joint_probs.csv', row.names = FALSE) ONS = read.csv('joint_probs.csv')   Names = NULL   for (i in 1:length(joint_probs))  {        Names[i] = paste(ONS$Var1[i], ONS$Var2[i], ONS$Var3[i], ONS$Var4[i], ONS$Var5[i], ONS$Var6[i], ONS$Var7[i], ONS$Var8[i],ONS$...
2013 Jan 21
2
how to bread while loop reading from connection with read.csv
Hello, I'm trying to read a file rows at a time, so as to not read the entire file into memory.? When reading the "connections" and "readLines" help, and "R help archive," it seems this should be possible with read.csv and a file connection, making use of the "nrows" argument, and checking where the "nrow()" of the new batch is zero rows. >From certain posts, it seemed that read.csv should return "character(0)" when the end of file is reached, and there are no more rows to read....
2005 Jun 09
3
dir() and RegEx and gsub()
Dear R-Users, I have two questions: a) in a directory there are 3 files: [1] "Data.~csv" "Kopie von Data.~csv" "VorlageTradefile.csv" The command "dir( fold, pattern = "\.csv" )" gives back *all* the 3 files With dir( fold, pattern = "\\.csv" ) I get back only VorlageTradefile.csv. I don't understand this behavi...