search for: datain

Displaying 20 results from an estimated 55 matches for "datain".

Did you mean: datais
2004 Aug 06
0
About sample code
...{ // Free encoder resource speex_bits_destroy(&enbits); speex_encoder_destroy(enc_state); // Free decoder resource speex_bits_destroy(&debits); speex_decoder_destroy(dec_state); } int SpeeXCodec::Encode(void *input, int inputSizeBytes, void *output, int *outputSizeBytes) { float *dataIn = (float *)input; char *dataOut = (char *)output; int nbBytes; if(dataIn==NULL) return 1; //error occur else{ /***********encode frame *************** input : dataIn ; output:enbits ***************************************/ speex_encode(enc_state,dataIn,&enbits);...
2015 Oct 20
2
Crear variable con condiciones
Buenas tardes a todos, Quisiera crear una variable de acuerdo a ciertas condiciones. Me gustaria llegar de "datain" a "dataout". ## entrada datain <- structure(list(REF = c("999", "999", "999", "1099", "731", "731", "731", "731", "1442", "1442", "1442", "1442"), TIMEREF = c(...
2015 Oct 21
3
Crear variable con condiciones
Muchas gracias Javier por tu respuesta. Si. Para obtener "dataout" se utilizan filas anteriores de acuerdo con la disponibilidad de la variable TOENDREF para cada valor de la variable REF. Por ejemplo, las filas 3 y 4 de "datain" son #REF TIMEREF TOENDREF #3 999 360 150 #4 1099 30 480 En la fila 3, el valor de TOENDREF es 150. Esto indica que hay 150 unidades disponibles de esa referencia. Ahora, en la fila 4, TIMEREF es 30 para REF = 1099. Como en esta fila TIMEREF es menor que TOENDREF para la...
2004 Mar 31
4
Removing leading and trailing spaces (string manipulation)
.... I'd like the file names to be 'Cluster1.jpeg', however the code write filenames like 'Cluster 1 .jpeg'. How can I get rid of the unwanted spaces? I've looked at ?format and it doesn't seem to work - at least in this context. ################### ClusCount <- 40 datain <- as.data.frame( read.csv("c:\\daclus.csv")) for(i in 1:ClusCount){ mapit <- subset(datain, cluster == i) jpeg(file=paste("c:\\temp\\cluster",format(i),".jpeg"), width = 640, height = 480, pointsize = 12,quality = 300, bg = "white") plot( as.matrix...
2011 Jan 31
2
Storing loop output in matrix
Hello I am trying to store output from a loop into an empty matrix. The current code I am using is: > M<-mat.or.vec(11,89) > for (j in list(3,91)) + {M[,(j-2)]<-pic(datain[,j], mytree)} datain is a matrix (11,91). I only want to use the pic() function on the columns 3:91. When I use this code output is stored into the 1st column of M and the 89th column of M but no other columns. Any help would be greatly appreciated Dean
2012 Apr 22
2
difficulty in Formatting time series data
Dear R-Gurus I have a data frame (from CSV file) which has its first column called Date. The Date is in the format mm/dd/yyyy. I was trying to get the weekday for these dates and I tried using wday() and day.of.week() functions and both of them gave me precisely the wrong answers. I think the issue lies in the proper formatting of dates. The class of this column is a factor class and hence I
2004 May 03
1
Speed up graphics output?
...day 12 language R ------------------------------------------- #Input file is comma-delimited and has GeogID, LON, LAT and CLUSTER #LON should be in column 2 and LAT in column 3 library(maptools) #Number of clusters in total ClusCount <- 150 #Read in Cluster Assignments datain <- as.data.frame( read.table("c:\\data\\Run1\\kmeansout_150.txt", header=TRUE )) colnames(datain) <- c("geogid","long","lat","cluster") #Set up screen device #split 2x2 - permits 1 map per section par(bg="white") split.screen(c(2,...
2006 Jul 14
0
EOF: object needs to be "field"?
.... Then I read in the binary data, and it has 3 dimensions: x, y, and time. The following is my code ------------------------------------------------------------------------------------------------------------------------- nx <- 349 ny <- 277 nt <- 312 nRunning <- 12 missing <- -900. datain <- readBin("PWAT-mon.197901-200412.dat",what=numeric(),n=nx*ny*nt,size=4,endian="little") datain[datain<missing] <- NA data <- array(datain,c(nx,ny,nt)) library(clim.pact) eof.c <- EOF(data,mon=1) -------------------------------------------------------------------...
2008 Nov 02
0
error in lapply (sorry error in last e-mail)
...r all, I am getting a error while using lapply to generate plots. The variable ".name" is used to identify each plot in the "main" variable. The method worked once but afterwards seems to throw up an error when used in a different case. The input ... dataOut <- lapply(names(dataIn), FUN = function(.name){ anotherplotFun(dataIn[[.name]], numb = .name)} ) Throws up the error ... Error in anotherplotFun(dataIn[[.name]], numb = .name) : promise already under evaluation: recursive default argument reference or earlier problems? Thanks Chibisi [[alternative HTML version d...
2012 Apr 09
0
Most efficient way to do this...
I have time-series data looking like this: > dataIn[sample(c(1:nrow(dataIn)), 25),] accelerometer_y id data_block_epoch_time 782 0.8424 201300 1331797330000 1868 0.3432 202386 1331797384000 1828 0.3510 202346 1331797382000 1026 0.2184 201544 1331797342000 1569 0.3...
2009 Dec 01
0
GLM Repeated measures test of assumptions: e.g. test for sphericity e.g. Bartletts and Levenes homogenous variances
...plot(model1,Anncov~fitted(.)|Site, abline=c(0,1)) And because you can't use Mauchly sphericity test used instead: library(ts) bob$resids<-model1$residuals[,2] site.level<-levels(bob$Site) par(mfrow=c(4,4), mar=c(2,4,0,0), oma=c(2,2,4,2)) for (i in seq(along=site.level)){ datain<-bob$Site==site.level[i] acf(bob[datain,"resids"],xlab="", ylab="", main=paste("Site", site.level[i]),las=1) } #end loop BUT WHEN I TRIED THE ABOVE FOR GLM IT WOULD NOT WORK And because can't use Tukeys used contrasts but...
2009 Dec 01
0
Amendment to previous post a minute ago, please amend before posting if possible
...plot(model1,Anncov~fitted(.)|Site, abline=c(0,1)) And because you can't use Mauchly sphericity test used instead: library(ts) bob$resids<-model1$residuals[,2] site.level<-levels(bob$Site) par(mfrow=c(4,4), mar=c(2,4,0,0), oma=c(2,2,4,2)) for (i in seq(along=site.level)){ datain<-bob$Site==site.level[i] acf(bob[datain,"resids"],xlab="", ylab="", main=paste("Site", site.level[i]),las=1) } #end loop BUT WHEN I TRIED THE ABOVE FOR GLM IT WOULD NOT WORK And because can't use Tukeys used contrasts but...
2011 Dec 01
2
R, PostgresSQL and poor performance
...r'' from date) as hour, extract(''year'' from date) as year from observations where pt = 6 and date >= ''1990-01-01'' and date < ''1995-01-01'' and lon > 180 and lon < 290 and lat > -30 and lat < 30 and sst is not null" dataIn <- dbGetQuery(dbh,sql) # ----------------------------- All variables are reals other than id which is varchar(10) and date which is a timestamp, approximately 1.5 million rows are returned by the query and it takes order 10 second to execute using psql (the command line client for Postgres) an...
2000 Nov 22
0
openssh 2.3.0p1: chan_read_failed for istate 8
...ng on a Linux-box with kernel 2.2.17. I compiled ssh from sources with pam-support. Let me describe what I'm doing: rsync -e ssh --delete --exclude "/Daten/test*" --exclude /Daten/anonymous --exclude /Daten/comp_logs --exclude /Daten/ehemalige_rwgsysm/cache --exclude /Daten/CONFIGMAN/DATAIN/CONFIGMAN/DATAIN -va root at sysman-ftp:/Daten /Daten After some time of running rsync, I get in /var/log/warn of the ssh-server the following message: sshd[16709]: error: channel 0: internal error: we do not read, but chan_read_failed for istate 8 and the session has been broken (it breakes at di...
2011 Nov 30
2
[PATCH] Add virtio-scsi to the virtio spec
...\begin_layout Plain Layout + +\change_inserted 1531152142 1322572435 + + u8 response; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572437 + + u8 sense[sense_size]; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572439 + + char datain[]; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572471 + +}; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572410 + +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572476 + +/* command-specific response v...
2011 Nov 30
2
[PATCH] Add virtio-scsi to the virtio spec
...\begin_layout Plain Layout + +\change_inserted 1531152142 1322572435 + + u8 response; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572437 + + u8 sense[sense_size]; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572439 + + char datain[]; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572471 + +}; +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572410 + +\end_layout + +\begin_layout Plain Layout + +\change_inserted 1531152142 1322572476 + +/* command-specific response v...
2009 Jun 20
1
string splitting and testing for enrichment
...Gene) and column 2 (TFBS) where each Gene would have several entries matching each TFBS. My main problem just now is that I can't split the TFBS column into separate strings (at the moment that 2nd column is all one string for each Gene). Here's where I am just now: test<-as.character(dataIn[,2]) # convert the 2nd column from factor to character test2<-unlist(strsplit(test[1], ' ')) # split the first element into individual strings (only the first element just now because I'm joust trying to get things working) test3<-unlist(strsplit(test2, '\\([0-9]\\)')) # g...
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
...md_req_pi { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn; - u32 pi_bytesout; /* DataOUT PI Number of bytes */ - u32 pi_bytesin; /* DataIN PI Number of bytes */ + __virtio32 pi_bytesout; /* DataOUT PI Number of bytes */ + __virtio32 pi_bytesin; /* DataIN PI Number of bytes */ u8 cdb[VIRTIO_SCSI_CDB_SIZE]; } __packed; /* Response, followed by sense data and data-in */ struct virtio_scsi_cmd_resp { - u32 sense_len; /* Sense dat...
2014 Nov 24
0
[PATCH v3 37/41] virtio_scsi: v1.0 support
...md_req_pi { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn; - u32 pi_bytesout; /* DataOUT PI Number of bytes */ - u32 pi_bytesin; /* DataIN PI Number of bytes */ + __virtio32 pi_bytesout; /* DataOUT PI Number of bytes */ + __virtio32 pi_bytesin; /* DataIN PI Number of bytes */ u8 cdb[VIRTIO_SCSI_CDB_SIZE]; } __packed; /* Response, followed by sense data and data-in */ struct virtio_scsi_cmd_resp { - u32 sense_len; /* Sense dat...
2014 Nov 27
0
[PATCH v5 41/45] virtio_scsi: v1.0 support
...md_req_pi { u8 lun[8]; /* Logical Unit Number */ - u64 tag; /* Command identifier */ + __virtio64 tag; /* Command identifier */ u8 task_attr; /* Task attribute */ u8 prio; /* SAM command priority field */ u8 crn; - u32 pi_bytesout; /* DataOUT PI Number of bytes */ - u32 pi_bytesin; /* DataIN PI Number of bytes */ + __virtio32 pi_bytesout; /* DataOUT PI Number of bytes */ + __virtio32 pi_bytesin; /* DataIN PI Number of bytes */ u8 cdb[VIRTIO_SCSI_CDB_SIZE]; } __packed; /* Response, followed by sense data and data-in */ struct virtio_scsi_cmd_resp { - u32 sense_len; /* Sense dat...