search for: rown

Displaying 17 results from an estimated 17 matches for "rown".

Did you mean: down
2009 Mar 30
3
Calculating First Occurance by a factor
...t1 4 850 p1 t1 5 1350 Here is the solution I have now. agg = aggregate(data$FixInx, list(data$Sub, data$Tr, data$IA), min) #get the minimum fix index by Sub, Tr, and IA... I can use this min fix index to pull out the desired fixtime agg$firstfixtime = 0 # new column for results for (rown in 1:length(rownames(agg))){ #cycle through rows and get each data$firstfixtime from FixTime in matching rows agg$firstfixtime[rown] = as.character(data[data$Tr == agg$Group.2[rown] & data$Sub == agg$Group.1[rown] & data$IA == agg$Group.3[rown] & data$FixInx == agg$x[rown], ]$FixTime...
2010 Sep 10
4
for loop help please!
Hi Everyone, I have a 2-dim data.matrix(e.g., table1) in which row1 specifies a range of values. row2 - rown specify the number of times I want to replicate each corresponding value in row1. I can do this with the following function: rep(c(table1[1,]),c(table1[X,])) #where X would go from 2 - n. Now, I can do this manually by changing the values of X and save each resulting array/vector in an object,...
2023 May 02
1
Reg: Help regarding ggplot2
....01 > > My code for the same is as follows > > ggplot(data=data_vol3, aes(x=index, y=data_vol3$usa)+ > geom_line()) Well you don't need to say that the y data are from data_vol3, your data = declaration says that. I wonder if what you want is: library(tidyverse) tribble( ? ~rowN, ~index, ~crepub, ~finland, ~france, ~germany, ~italy, ~netherlands, ~norway, ~poland, ? 1, "2005-01-03", 1.21, 0.615, 1.90, 3.01, 0.346, 0.509, 1.05, 1.13, ? 2, "2005-01-04", 1.18, 0.615, 1.85, 2.89, 0.346, 0.509, 0.889, 1.12, ? 3, "2005-01-05", 1.15, 0.615, 1.81,...
2006 Oct 24
0
plot(all.effects)
..., col=1, nrow=1, ncol=1, more=FALSE so that I can plot multiple effect plots on one layout? I was hoping that a call like last <- rep(c(TRUE, FALSE), c(3, 1)) lay <-matrix(c(1:4,), 2, 2, byrow = T) for(i in 1:4) { tmp.lm <- lm(y ~ a + b, data) spl <- which(lay == i, arr.ind = TRUE) rowN = spl[1] colN = spl[2] plot(all.effects(tmp.lm), row = rowN, col = colN, nrow = 2, ncol = 2, more = last[i]) } would work (my data are complicated, and have not had the time to set up a replicable example). Here is what I ran, and what R told me: for(i in 1:4) { tmp.lm <- lm(duration ~...
2008 Sep 18
4
Strange ! characters inserted into emails
...l is some boilerplate text and HTML that is pulled from a database. When the emails are received there are random instances of " !" (that's a space and a bang symbol) inserted into the email in various locations. For example a sentence that is supposed to read like this: The quick brown fox jumped over the lazy dog. ends up looking like this: The quick b !rown fox jumped over the laz !y dog. We combed through the source text and didn't find any unusual characters in the body of the text. Somehow these bang symbols are being inserted after the mail is handed off to sendmail...
2007 Nov 12
1
update matrix with subset of it where only row names match
I guess this has a simple solution: I have matrix 'mat1' which has row and column names, e.g.: A B C row1 0 0 0 row2 0 0 0 .... rown 0 0 0 I have a another matrix 'mat2', essentially a subset of 'mat1' where the rownames are all in 'mat1' e.g.: B row3 5 row8 6 row54 7 I want to insert the values of matrix mat2 for column B (in reality it could be some or all of column names A, B or C, etc.) (same n...
2006 Apr 18
2
questioin about cluster in R
...struggled on that for a while but failed to found the solution. I have a distance matrix as below. --- 0 35 33 9 36 35 0 10 32 51 33 10 0 30 49 9 32 30 0 35 36 51 49 35 0 ------------------- I want to do cluster with average method. ---- rown<-c("A", "B", "C", "D", "E") mydistMatrix <- read.table("D:\\5.distance",row.names = rown) mydistObj<-as.dist(mydistMatrix, diag = FALSE, upper = FALSE) mycluster <- hclust(mydistObj,method="average") bmp(filename =...
2013 Mar 25
3
nested 'while' loops
...g code to go over every element of a data frame (row wise). The problem I am facing is that the outer 'x' variable is not incrementing itself, thus, only one row of values is obtained, and the program does not proceed to the next row. This is the code: while(x<=coln) { while(y<=rown) { n<-as.numeric(df[[y]][x]); if(n>0) { lim<-(n-1); S<-100; (...) } opdf[[y]][x]<-sum; } y<-y+1; } x<-x+1; } Here is a sample of the input data: GENE A CD EF GH IK LM NP QR ST VW Y 2amt:Amet_0001 29 023...
2009 Dec 15
2
read dataset in R language.
Hi, Could you please help me in solving the following error message: Error in `[.data.frame`(mytestdata, fp_temp == 1) : undefined columns selected when I use scan instead on read.table, I reicieve this message: Error in names(ret2) <- rowns : 'names' attribute [172] must be the same length as the vector [152] Many thanks, Nancy _________________________________________________________________ [[alternative HTML version deleted]]
2012 Nov 29
1
Coerce rownames to factor for ordering
Hi all, I think this might be an easy one but I cannot think of a way to do this other than what I am currently attempting. I simply want to sort my data frame's rownames by a defined vector so that the plots I generate from that vector are in the desired order Consider the test data below: #Create test data DataToPlot.. <- data.frame("Location1" = c(100,200),"Location2" = c(200,400)) #Name rowns rownames(DataToPlot..) <- c(&quot...
2010 Jun 24
1
help in SVM
...assification", kernel="radial", probability = TRUE, cost=bestc, gamma=bestg, cross=10) # model fitting svm.pred<-predict(svm.fit, hh, decision.values = TRUE, probability = TRUE) # find the probability. * Error in matrix(ret$dec, nrow = nrow(newdata), byrow = TRUE, dimnames = list(rowns, : invalid 'ncol' value (too large or NA)* > head(all_h) DD HK HQ IL LP NE NP TA TP WA WC 1 0.00543 0 0 0.00815 0.00272 0.00543 0.00000 0.00000 0.00000 0.00000 0 3 0.00000 0 0 0.00890 0.00890 0.00712 0.00534 0.0000...
2023 May 02
5
Reg: Help regarding ggplot2
Dear All, I have a dataset which contains date and 12 other countries data. I have extracted the data as xts object. I am not able to recall all the series in the Y axis. My data set looks like this index crepub finland france germany italy netherlands norway poland <date> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
2009 Apr 01
0
smv() in "e1071" and the BreastCancer data from "mlbench"
...8.1 year 2008 month 12 day 22 svn rev 47281 language R version.string R version 2.8.1 (2008-12-22) > tobj <- tune.svm(Class ~ ., data=BC, gamma=seq(0.0001,0.2,length=3), + cost=seq(1,100,length=3)) Error in names(ret2) <- rowns : 'names' attribute [70] must be the same length as the vector [68] Sorry, but could someone tell me what the error is trying to get at? thanks, Brandon ----------------------------------------------------------- This e-mail was sent by GlaxoSmithKline Services Unlimited (registe...
2006 Jan 20
1
Samba printing
...figure samba so the job name submitted can be interpreted by Hylafax as a phone number? I'm hoping this posts to the samba mailing list since I'm new and don't want more spam than I'm already getting. My email add ress is r continue on next line owan continue on next line @rown continue on next line etco.com
2015 Feb 24
2
Current 6.8 git build issues on HP-UX
On Tue, Feb 24, 2015 at 2:20 PM, Darren Tucker <dtucker at zip.com.au> wrote: > On Wed, Feb 25, 2015 at 09:13:22AM +1100, Darren Tucker wrote: > > On Wed, Feb 25, 2015 at 09:04:57AM +1100, Darren Tucker wrote: > > > On Tue, Feb 24, 2015 at 12:11:16PM -0800, Kevin Brott wrote: > > > > ld: Unsatisfied symbol "xstrdup" in file > > > >
2009 Apr 01
0
回复: R-help Digest, Vol 73, Issue 32
...ot;, seq(from = -89.75, to = 89.75, length = 360)) columnnames <- sprintf("%.2f", seq(from = -179.75, to = 179.75, length = 720)) for (i in files) {         assign(colnames((paste(Fekete_",index$year[i], index$month[i])", sep='')), columnnames)                 assign(rownames(paste("rownames(Fekete_",index$year[i], index$month[i],")", sep=''), rnames))                     } Error: unexpected string constant in: "for (i in files) { assign(colnames((paste(Fekete_",index$year[i], index$month[i])"" >                 a...
2000 Aug 31
3
help with data import/export
how can I import/export data from ms excel? also is there a way to import/export data of the hdf format? is there a way to import/export hdf format for ms excel as well? thank you very much in advance. /js ###################################################################### This e-mail message has been scanned and cleared by MailMarshal http://www.marshalsoftware.com