similar to: Spliting a huge vector

Displaying 20 results from an estimated 10000 matches similar to: "Spliting a huge vector"

2012 Jun 15
2
strings concatenation and organization (fast)
Hello, What is the fastest way to do this? I has to be done quite a few times. Basically I have sets of 3 numbers (as characters) and sets of 3 dashes and I have to store them in named columns. The order of the sets and the column name they fall under is important. The actual numbers and the pattern/order of the sets should be considered random/unpredictable. Sample data: vec =
2007 May 18
2
Split a vector(list) into 3 list
Hi, I have a vector contains values 1,2,3. Can I call a function split to split it into 3 vectors with 1 corresponds to value ==1, which contain all the indexes for value==1. 2 corresponds to value ==2 which contain all the indexes for value=2 Thanks pat
2005 May 24
2
reading multiple files
Dear All, How do I read in multiple data frames or matrices in a loop, e.g. for (i in 1:n) { channel <- odbcConnectExcel("filenames") file[i] <- as.data.frame(sqlFetch(channel, "sheet")) } I would like file[i] to be the name of the data.frame (i.e. file[1], file[2], file[3],...etc) rather than a vector. Thanks in advance for any help. Dave
2009 Dec 01
3
Using two (...) in a function
Hello R-Helpers, I am not sure if it is a very simple question but I would like to use two (...) in a function, for example, this is a script where I would like to input the variable names (in one of the (...)) and the variances associated to those variables which are not calculated in the script because there is a specific software to calculate it (the other (...)) data <- function
2005 Jun 07
2
reading non-existing files
Dear all, I'm trying to read to a collection of files in a loop using odbcConnectExcel - but not all of the files exist. This is the code I have for(i in 1:no.of.subs){ channel <- odbcConnectExcel(paste(working.dir, subs[i], ".xls", sep="")) datafiles[[i]] <- as.matrix(sqlFetch(channel, "Data")) close(channel) } I'm not sure how to
2009 Mar 24
1
How to separate huge dataset into chunks
Hello all, I?m trying to take a huge dataset (1.5 GB) and separate it into smaller chunks with R. So far I had nothing but problems. I cannot load the whole dataset in R due to memory problems. So, I instead try to load a few (100000) lines at a time (with read.table). However, R kept crashing (with no error message) at about the 6800000 line. This is extremely frustrating. To try to fix
2005 Apr 07
1
Importing data into R
I have a highly formated Excel with multiple tabs. Is it currently possible to read this data into R without changing the format of the Excel file? Also, is it possible to write back to the same Excel file or at least create a new Excel file with the same formatting as before with modified data which has been processed in R. Thanks in advance for any help that you can provide. Dave
1999 Mar 24
2
Change of parsing parameters to functions between 0.63.1 and 0.63.3 ?
Hi, I wonder whether the mechanism of parsing parameters to functions has changed between 0.63.1 and 0.63.3? The following code yeils different results in R 0.63.1 (Version 0.63.1 (Dec 5, 1998)) and R 0.63.3. cave<-function(x,a,b) { return(c(mean(x[a],na.rm=T),mean(x[b],na.rm=T))) } datx <- data.frame(rbind(c(1,2,3,4),c(4,5,6,7)))
1999 Mar 24
2
Change of parsing parameters to functions between 0.63.1 and 0.63.3 ?
Hi, I wonder whether the mechanism of parsing parameters to functions has changed between 0.63.1 and 0.63.3? The following code yeils different results in R 0.63.1 (Version 0.63.1 (Dec 5, 1998)) and R 0.63.3. cave<-function(x,a,b) { return(c(mean(x[a],na.rm=T),mean(x[b],na.rm=T))) } datx <- data.frame(rbind(c(1,2,3,4),c(4,5,6,7)))
2008 Jun 17
6
mirroring zfs slice
Hi All, I had a slice with zfs file system which I want to mirror, I followed the procedure mentioned in the amin guide I am getting this error. Can you tell me what I did wrong? root # zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT export 254G 230K 254G 0% ONLINE - root # echo |format Searching for disks...done
2020 Oct 23
2
3d plot of earth with cut
Dear All, Thanks a lot for the useful help again. I manage to get it done up to a point where I think I just need to apply some smoothing/interpolation to get denser points, to make it nice. Basically, I started from Duncen's script to visualize and make the clipping along a plane at a slice. Then I map my data points' values to a color palette and just plot them as points on this plane.
2006 Apr 17
1
strsplit does not return correct value when spliting "" (PR#8777)
Full_Name: Charles Dupont Version: 2.2.0 OS: linux Submission from: (NULL) (160.129.129.136) when strsplit("", " ") returns character(0) where as strsplit("a", " ") returns "a". these return values are not constiant with each other. Charles Dupont
2006 Apr 17
0
(PR#8777) strsplit does [not] return correct value when spliting ""
Prof Brian Ripley wrote: > On Mon, 17 Apr 2006, Charles Dupont wrote: [...] > > The man page states in the value section that strsplit returns: > > A list of length 'length(x)' the 'i'-th element of which contains > > the vector of splits of 'x[i]'. > > > > It mentions no change in behavior if the value of x[i] = "". >
2006 Jul 28
1
spliting
Dear mailing list, I have a big data frame and each element in the matrix has two alphabets. I want to split those alphabets into two so each element will have one alphabet and the number of my columns will be doubled . So can some one help with the code? Example of what I want is to split them. Input (three column) GG AG AG CC CC CC CC CC CC AG
2008 Jul 17
2
spliting a string
Hi String<-"130.5" Df<-Strsplit(".",":",String) Then Df get "" "" "" "" But I want Df should contains Df "130" "5" If any body knows how to do it.tel me Thanks K.Ravichandra [[alternative HTML version deleted]]
2010 Nov 01
1
spliting first 10 words in a string
Hi all, I have a columnn with text that has quite a few words in it. I would like to split these words in separate columns, but just first ten words in the string. Is that possible in R? Thank you, m [[alternative HTML version deleted]]
2007 Nov 28
1
how to find and use specific column after spliting dataframe
Dear all: I am a new R-user and I have 2 questions about it. 1) I need to find specific sub-dataframe, and then use specific column to calculate. For example, after splitting dataframe, I find specific the sub-dataframe, such as ?A.split [1]?. But, I don?t know how to find ?time? and ?concentration? columns of ?A.split [1]?. 2) The equation used to sub-dataframe is
2020 Oct 22
0
3d plot of earth with cut
> It should be a 2D slice/plane embedded into a 3D space. I was able to come up with the plot, attached. My intention was to plot national boundaries on the surface of a sphere. And put the slice inside. However, I haven't (as yet) worked out how to get the coordinates for the boundaries. Let me know, if of any value. And I'll post the code. (But needs to be polished first)
2009 Dec 17
2
Problem with spliting a dataframe values
Hi all, Hi this is kiran I am facing a problem to split a dataframe that is.. i have a string like: "a,b,c|1,2,3|4,5,6|7,8,8" first I have to split with respect to "|" I did it with command unlist(strsplit("a,b,c|1,2,3|4,5,6|7,8,8", "\\,")) after getting that set i made it as a dataframe and it comes like a,b,c 1,2,3 4,5,6 7,8,8 now i have to
2020 Oct 22
2
3d plot of earth with cut
Thanks for your idea. It should be a 2D slice/plane embedded into a 3D space. Could be static, I just need to make a single figure from it for illustration of the Earth together with its interior in 3D. So, the interior would be a slice in 2D along a fixed longitude. And along this 2D slice would be a heatmap. Again, embedded in 3D, since it would be shown as a slice of Earth in 3D. Duncan?s