similar to: replicate lines of data frame

Displaying 20 results from an estimated 700 matches similar to: "replicate lines of data frame"

2011 Aug 31
2
dbWriteTable error message
I am at loss of what is going on here ... I am trying to write to a SQLite database: con <- dbConnect(dbDriver("SQLite"), dbname="pres-docs.rqda") I have a data frame that is 889 rows by 7 columns. The column number and types agree with the database table columns and column type. dbWriteTable(con, "fileAttr", DF.4, row.names=FALSE, overwrite=TRUE) Then I get
2011 Nov 17
3
merging corpora and metadata
Greetings! I loose all my metadata after concatenating corpora. This is an example of what happens: > meta(corpus.1) MetaID cid fid selfirst selend fname 1 0 1 11 2169 2518 WCPD-2001-01-29-Pg217.scrb 2 0 1 14 9189 9702 WCPD-2003-01-13-Pg39.scrb 3 0 1 14 2109 2577 WCPD-2003-01-13-Pg39.scrb .... .... 17 0
2011 Oct 21
2
stacked plot
Hi! I am trying to use ggplot2 to create a stacked bar plot. Previously I tried using barplot() but gave up because of problems with the positioning of the legend and other appearance problems. I am now trying to learn ggplot2 and use it for all the plots that I need to create for my dissertation. I am able to create normal bar plots using ggplot2, but I am stomped with the stacked bar plots.
2011 Aug 25
1
change values in a character vector
Greetings! I have a 127 long vector with all different character entries. I need to generate another vector that is 6 times a long and the second one and has the following structure: NA "foo" "a unique string" NA "bar" "blah" NA "foo" "another unique string" NA "bar" "blah" ..... This has to be repeated 127
2011 Sep 20
1
Works from CLI but not from prompt
Greegings! Any idea why this works from the command line, but not from a source file? This is driving me (more) insane. regexp <- "[Aa]ccountability" Thanks! -- Henri-Paul Indiogine Curriculum & Instruction Texas A&M University TutorFind Learning Centre Email: hindiogine at gmail.com Skype: hindiogine Website: http://people.cehd.tamu.edu/~sindiogine
2012 Oct 18
4
speeding read.table
R 2.15.1 OS X Colleagues, I am reading a 1 GB file into R using read.table. The file consists of 100 tables, each of which is headed by two lines of characters. The first of these lines is: TABLE NO. 1 The second is a list of column headers. For example: TABLE NO. 1 COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL8 COL9 COL10
2016 Dec 20
2
colnames for data.frame could be greatly improved
Hello, colnames seems to be not optimized well for data.frame. It escapes processing for data.frame in if (is.data.frame(x) && do.NULL) return(names(x)) but only when do.NULL true. This makes huge difference when do.NULL false. Minimal edit to `colnames`: if (is.data.frame(x)) { nm <- names(x) if (do.NULL || !is.null(nm)) return(nm) else
2005 May 02
4
"apply" question
Dear R users, I??ve got a simple question but somehow I can??t find the solution: I have a data frame with columns 1-5 containing one set of integer values, and columns 6-10 containing another set of integer values. Columns 6-10 contain NA??s at some places. I now want to calculate (1) the number of values in each row of columns 6-10 that were NA??s (2) the sum of all values on columns 1-5
2011 Sep 26
2
findAssocs()
I am trying to find the math behind the "tm" package findAssocs() ?findAssocs does not say anything besides "association" and "correlate" Usually entering "findAssocs" at the CLI gives the code for a R function, but in this case I obtain: function (x, term, corlimit) UseMethod("findAssocs", x) <environment: namespace:tm> Any ideas?
2012 Feb 15
1
neuralnet problem
Hello List ! I'm a bright new R user, and I encounter a problem when trying to use the neuralnet package. I have a training set with 8 inputs, and there are 3 outputs (I need 3 distinct neurones as output). Although I read the examples, and the package article, I don't know how to tell R there are 3 outputs (3 outputs neurones). Here is my actual code : # All = input data All <-
2012 May 23
5
linux
Dear All I can not download R for Linux. I do not know which file I should install? Best Regards, Soheila
2006 Dec 14
5
Better way to change the name of a column in a dataframe?
Hello R users -- If I have a dataframe such as the following, named "frame" with the columns intended to be named col1 through col6, > frame col1 col2 cmlo3 col4 col5 col6 [1,] 3 10 2 6 5 7 [2,] 6 8 4 10 7 1 [3,] 7 5 1 3 1 8 [4,] 10 6 5 4 9 2 and I want to correct or otherwise change the
2016 Dec 27
0
colnames for data.frame could be greatly improved
Hi there, Any update on this? Should I create bugzilla ticket and submit patch? Regards Jan Gorecki On 20 December 2016 at 01:27, Jan Gorecki <J.Gorecki at wit.edu.pl> wrote: > Hello, > > colnames seems to be not optimized well for data.frame. It escapes > processing for data.frame in > > if (is.data.frame(x) && do.NULL) > return(names(x)) > > but
2009 Nov 05
1
Set colors in a PCA plot based on a gradient vector
Hi all, I'm making a PCA plot with eight variables (columns taken from a larger data frame "fieldTrial0809[idx,c(39:46)]"). I then want the symbols in the plot to be colored as a gradient from red to blue, depending on the value of another column in "fieldTrial0809[idx, c(48)]" containg temperatures from -12.1 to -5.4. I don't want to use the heat.colors(n)
2013 Jan 03
5
splitting matrices
Dear useRs, i want to split a matrix having 1116rows and 12 columns. i want to split that matrix into 36 small matrices each having 12 columns and 31 rows. The big matrix should be splitted row wise. which means that the first small matrix should copy values which are in first 31 rows and 12 columns of the big matrix. similarly 2nd small matrix should contain values from 32nd to 63rd row of the
2006 Mar 28
1
weights in glm (PR#8720)
Full_Name: Robert Pusz Version: 2.2.1 OS: Windows Submission from: (NULL) (157.25.9.126) Hello, In my opinion something is wrong with 'weights' option in glm. My code is following: ###begin of the code#### cl <- c(5012, 106, 3410, 5655, 1092, 1513, 557, 1351, 3133, 2063, 3257, 4179, 5582, 5900, 8473, 4932, 3463, 5596, 2262, 0, 2638, 1111, 4881, 4211, 6271, 5257, 6926, 6165, 0, 0,
2006 Jan 21
1
SOLVED: proprietary SSH -> OpenSSH migration and rsync errors
2006/1/20, Salvatore Enrico Indiogine <hindiogine at gmail.com>: > 2006/1/20, Jim Perrin <jperrin at gmail.com>: > > > When I run rsync over ssh, even sudo, I get permissions errors: > > > > > > sudo rsync -av --rsh=/usr/bin/ssh --delete <source dir> > > > <user>@<server>:<dest dir> > > > > > > >
2013 Jan 02
4
list of matrices
dear useRs, i have a list containing 16 matrices. i want to calculate the column mean of each of them. i tried >sr <- lapply(s,function(x) colMeans(x, na.rm=TRUE)) but i am getting the following error >Error in colMeans(x, na.rm = TRUE) : 'x' must be numeric can it be done in any other way? and why i am getting this error?? thanks in advance.. elisa [[alternative
2012 Nov 23
6
Summary statistics for matrix columns
Hi, is there a way I can calculate a summary statistics for a columns matrix let say we have this matrix x <- matrix(sample(1:8000),nrow=100) colnames(x)<- paste("Col",1:ncol(x),sep="") if I used summary summary(x) i get the output for each column but I need the output to be in matrix with rownames and all the columns beside it this how I want it
2007 May 06
1
intersect of 2 data frames
Greetings! I am a new user of R. The only one in my department, all others use SPSS. I have two data sets of students with test scores, pretest and posttest. The first column StuNum and then columns of scores. The problem is that the lists are slightly different not all students are in both data sets. So I did: intersect(pretest$StuNum, posttest$StuNum) -> common.id At this point I need