search for: coldata

Displaying 18 results from an estimated 18 matches for "coldata".

2006 Jun 22
2
.Call and data frames
...de the function looks like: SEXP myfunc(SEXP df), and it is called with a dataframe from the R side with: .Call("myfunc", somedataframe) On the C side (actually C++ side) I use code like this: SEXP colnames = getAttrib(df, R_NamesSymbol) cname = string(CHAR(STRING_ELT(colnames,i)) SEXP coldata = VECTOR_ELT(df,i) (data for i-th column) if(isReal(colData)) x = REAL(colData)[j]; else if(isInteger(colData)) i = INTEGER(colData)[j]; else if(isString(colData)) s = CHAR(STRING_ELT(colData,j)) The problem is that the last test (isString) never passes, even when I pass in a frame for...
2020 Sep 24
1
How to use `[` without evaluating the arguments.
...a [`list`] #' #' #' @return [`LongTable`] object containing the assay data from a #' #' @import data.table #' @keywords internal .LongTable <- setClass("LongTable", slots=list(rowData='data.table', colData='data.table', assays='list', metadata='list', .intern='environment'), contains='long.table') #' LongTable constructor method #...
2017 Jun 08
1
DESeq2 pairwise compasion
...velopment stages 5 WEEK (5W), 7W, 9W. Three tissue: Ca, Co, Pa each with 2 biological replicate. With two biological replicate. I want to do differential gene expression analysis using DESeq2 so I tried these codes after reading about DESeq2: ,my aim is to do the pairwise comparison. how to make colData and design formula. library("DESeq2") countMatrix = read.table("read_count.22May.2017.new.txt",header=T,sep='\t',check.names=F) head(countMatrix) dim(countMatrix) [1] 57894 35 Now I am not sure how to construct a DESeqDataSet: dds <- DESeqDataSetFromMatrix(co...
2000 Mar 08
0
RODBC: follow up
...ot;" as column names (except for "tablename" as third column name) I don't know whether this is a R bug or expected behaviour. However it currently creates trouble as the later call of query <- sqltablecreate(tablename, newname, keys = 0) fails at Browse[1]> debug: if (coldata[i, 11] == 1) { null <- "NULL" } else { null <- "NOT NULL" } Browse[1]> Error in [.data.frame(coldata, i, 11) : undefined columns selected because newname/coldata misses colnames debug: print(coldata) Browse[1]> tablename 1 NA NA dd V1...
2013 Sep 19
1
Vignette problem and CRAN policies
...und on this system: Text::CSV_XS If you have more than one Perl installation, be sure the correct one was used he re. Otherwise, please install the missing modules. See the package INSTALL file for more information. Loading required package: RODBC Warning in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : character data 'Adrian Baddeley <Adrian.Baddeley at uwa.edu.au> and Rolf Turner <r.turner at auckland.ac.nz> with substantial contributions of code by Kasper Klitgaard Berthelsen; Abdollah Jalilian; Marie-Colette van Liesho ut; Ege Rubak;...
2005 Nov 25
1
read.table without sep
...ot;\t") a<-data[1] b<-data[2] totnorm(a,b) The problem i am facing is- xlab and ylab contain the column names of data[1] and data[2], but data[1][[1]] which is assigned to x1 has different data which does not correspond to the colname(data[1]). Stating more clearly, the colnames and the coldata don't match. I tried usind read.tablewithout sep attribute, as given below: data1<-read.table("alldata.txt",header=TRUE) But this statement is not getting executed using Rserve when i make a connection to R and try to execute it from a java servlet. I don't know why it was do...
2005 Nov 25
1
read.table without sep
...ot;\t") a<-data[1] b<-data[2] totnorm(a,b) The problem i am facing is- xlab and ylab contain the column names of data[1] and data[2], but data[1][[1]] which is assigned to x1 has different data which does not correspond to the colname(data[1]). Stating more clearly, the colnames and the coldata don't match. I tried usind read.tablewithout sep attribute, as given below: data1<-read.table("alldata.txt",header=TRUE) But this statement is not getting executed using Rserve when i make a connection to R and try to execute it from a java servlet. I don't know why it was do...
2006 May 02
1
Is there a bug in CrossTable (gmodels)
Library gmodels include a function CrossTable that is useful for crosstabulation. In the help, it is indicated that one can call this function as CrossTable(data), were data is a matrix. However, when I try to use this option, it doesn't help. Any idea? Is there a bug? Thanks for your help. Prof. Albert Sorribas Grup de Biomatem?tica i Bioestad?stica Departament de Ci?ncies M?diques B?siques
2011 Dec 04
1
RODBC sqlSave / append problem (windows XP, R 2.13.2)
...I would ideally like this to be the same name etc as the original table in Access. I have used the following command: R> sqlSave(con,as.data.frame(SA_data),tablename="Const_mats_8301_t1",rownam es=T,fast=T, append=T) And get the error: Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : missing columns in 'data' Thanks in advance, mj Visit our website at http://www.ubs.com This message contains confidential information and is in...{{dropped:26}}
2005 Jun 23
1
the dimname of a table
i have a data frame(dat) which has many variables.and i use the following script to get the crosstable. >danx2<-c("x1.1","x1.2","x1.3","x1.4","x1.5","x2","x4","x5","x6","x7","x8.1","x8.2","x8.3","x8.4","x11",
2001 Aug 31
1
RODBC SQLSave
...ot;oracle") Then I extract some data, actually a whole table; orgdata <- sqlQuery(dbConn, "select * from organism", na.strings = "NA") Then I try to save it back; sqlSave(dbConn, orgdata, rownames="cols", verbose = TRUE) and I get the following error; Error in coldata[, 1] : incorrect number of dimensions I'm not well versed in R and I am afraid I don't understand this error. Can anyone help? Gavin K. Gavin Kennedy Software Engineer - Bioinformatics CSIRO Mathematical and Information Sciences Gavin.Kennedy at CMIS.CSIRO.AU ph: 612-6246-4929 -.-.-...
2005 Nov 16
1
RODBC and Very long field lengths
...a string from a very long memo field (512*20*9=9360 characters = 74880 bytes) in an MSAccess database. It appears that RODBC set a maximum buffer size for a single column of 65535 bytes. ########## cut from RODBC.c ########## } else { /* transfer as character */ int datalen = thisHandle->ColData[i].ColSize; if (datalen <= 0 || datalen < COLMAX) datalen = COLMAX; /* sanity check as the reports are sometimes unreliable */ if (datalen > 65535) datalen = 65535; ###################################### Can I increase this by just changeing the value in RODBC.c? If so how...
2010 Feb 24
1
problem with looping on sqlSave()
...;, "crit", "numsig", "pc")) > xlsFile <- odbcConnectExcel("file.xls", readOnly=F) > for (i in 1:4){ sqlSave(xlsFile, as.data.frame(test[[i]]), tablename="test", rownames=F, addPK=T, append=T) } Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : missing columns in 'data' > odbcCloseAll() I've tried different combination and the 1st element is always exported but the next ones never. Elements 2 and 3 have the same number of columns; the problem persists in that case. Thanks a lot for your help Iva...
2010 May 20
0
RODBC: sqlSave leave primary key and other columns null
...e. I omit the primary key, which is a uniqueidentifier type (MS SQL), so that the database can populate that field. However, I get the following error: > sqlSave( ch, result, tablename=thetablename, append=TRUE, rownames=FALSE, colnames=FALSE ) Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : missing columns in 'data' Enter a frame number, or 0 to exit 1: sqlSave(ch, result, tablename = "CreditLadderData", append = TRUE, rownames 2: sqlwrite(channel, tablename, dat, verbose = verbose, fast = fast, test = te 3: odbcUpdate(channel, query, my...
2012 Feb 06
0
sqsSave() test using Test.R script returning error suggesting no values upon "insert"
...-------------------------------------------- #Then we get here.  I have the USArrests data and checked it but tried to save as it produced an error. sqlSave(channel, USArrests,"test.USArrests",rownames = "state", addPK = TRUE) "Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test,  :   no parameters, so nothing to update" The database table exists and upon edit of the table fields, all table info created correctly. Attempted again adding "verbose=TRUE": > sqlSave(channel, USArrests,"test.USArrests",rownames = "state&quot...
2012 May 29
1
RODBC, Excel, and data truncation when writing
...data.frame(v1=c(1,2),v2=c(paste(rep("test",100),collapse=""),"test")) z <- odbcConnectExcel2007("test_rodbc.xlsx",readOnly=FALSE) sqlSave(z,d,tablename="Sheet1",rownames=FALSE) odbcClose(z) Warning message: In odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : character data 'testtesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttesttes...
2002 Jul 27
1
R Code for X-Tab with Row/Col Proportions, Expected Vals and Tests
Recently, I noted a post and replies on R-Help from Professor Marc Feldesman regarding a cross tabulation function that generates row and column proportions, marginal values, expected cell values and tests for independence presumably similar in a fashion to the output of the S-Plus crosstabs() function or the SAS Proc Freq. Martin Maechler had posted some code in reply for folks to update and
2013 Jan 31
0
RODBC and datetimes
...lumns things work fine. However, when I attempt to add another column of type POSIXct to the data.frame and redefine the table to incorporate the new column (in the DB),attempting to push the table to the DB using sqlSave results in the following error: Error in odbcUpdate(channel, query, mydata, coldata[m, ], test = test, : missing columns in 'data' Has anyone successfully been able to insert into a datetime field in ms sql server? If so, what type of variable did you use in R? I'm not really sure where to go or what to try next here. Any advice is appreciated. Thanks! Dave Mi...