Displaying 20 results from an estimated 2000 matches similar to: "Split string"
2009 Apr 12
2
Convert string to time
One variable contains values (1.30 - one hour and thirty minutes, 1.2
(which is supposed to be 1.20 - one hour and twenty minutes)). I would
like to convert to a minute variable so 1.2 is converted to 80
minutes. How?
2011 Mar 29
2
List extraction
I have created a list of tables with the same columns but different number of
row.
Example (actual list has ~200 elements):
> temp1<- data.frame(ID=c("Herb","Shrub"),stat=c(4,5),pvalue=c(.03,.04))
> temp2<- data.frame(ID=c("Herb","Shrub",
> "Tree"),stat=c(12,15,13),pvalue=c(.2,0.4,.3))
> L<-list(a=temp1,b=temp2)
> L
$a
2008 Jan 07
1
numerical data frame
Dear All,
I've successfully import my synteny data to R by using scan command. Below show my results. My major problem with my data is how am i going to combine the column names with the data( splt) where i have tried on cbind but a warning message occur. I have realized that the splt data only have 5 column instead of 6. Please help me with this!!
I want my data to be a numerical
2013 Jun 14
2
[LLVMdev] Building pass out of source with cmake: undefined symbol error
Hmmm, I just thought of something. Perhaps I need to set the MODULE cmake flag (via -DMODULE=ON)? I will try this today. (I remembered the LOADABLE_MODULE=1 flag in the makefile, and the if ( MODULE ) check in the AddLLVM cmake module.)
________________________________
From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at
2013 Jun 14
1
[LLVMdev] Building pass out of source with cmake: undefined symbol error
Ah! Think I figured it out -- it's rtti. When I build with -fno-rtti, the spurious symbol disappears. Blargh, that was complicated. I'm going to try an out-of-source cmake build now. So far this has been a soliloquy, hope it helps someone else.
________________________________
From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen
2013 Jun 14
0
[LLVMdev] Building pass out of source with cmake: undefined symbol error
Still no go. I'm going to experiment building out of source manually with the cmake build and autotools build. I should've mentioned that I'm attempting this with the hello world pass example.
________________________________
From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of Charles Jacobsen [charlie.jacobsen at utah.edu]
Sent: Friday, June 14, 2013
2008 Oct 01
1
Please help me to produce smoothed contour plots
Please help me to produce smoothed contour plots.
I have dependent data generated at regular intervals of two independent
variables and would like to produce smoothed contour plots - I cannot get
interp (alima) to produce cubic interpolations of the data, only linear
ones. I'm interested in smoothing as the data generation process is
stochastic and produces small variations which I'd
2008 Jan 02
2
Seeking a more efficient way to read in a file
Hi.
I have a matrix stored in a large, tab-delimited flat file. The first row contains column names. Because the matrix is symmetric, the file has lower triangular format, so the second row contains one number, the third row two numbers, etc. In general, row k+1 contains k numbers; the matrix has 3000 rows, so the file has 3001 rows. The file has variable length records, so each row ends
2009 Feb 11
2
error in my previous message
i'm sorry. i had an error in my previous code because i left out a
letter in the rownames.
while fixing that, i also found a solution. so i'm sorry for the
confusion.
below is my fix.
temp2 <- matrix(rnorm(10),nc=1,nrow=10)
rownames(temp2) <-
2009 Feb 11
2
sorting a matrix by the column
this is a bad question but I can't figure it out and i've tried. if i
sort the 2 column
matrix , temp1, by the first column, then things work as expected. But,
if I sort the 1 column matrix, temp2, then it gets turned coerced to a
vector. I realize that I
need to use drop=FALSE but i've put it in a few different places with no
success. Thanks.
temp1 <-
2008 Jul 09
2
Parsing
Dear R users,
I have a big text file formatted like this:
x x_string
y y_string
id1 id1_string
id2 id2_string
z z_string
w w_string
stuff stuff stuff
stuff stuff stuff
stuff stuff stuff
//
x x_string1
y y_string1
z z_string1
w w_string1
stuff stuff stuff
stuff stuff stuff
stuff stuff stuff
//
x x_string2
y y_string2
id1
2012 Oct 31
2
Aggregate Table Data into Cell Frequencies
R-help -
I have this set of aggregated tables (sample data below via dput()). And I
would like to have delayValue as the column variables with the "temp"
(temp1, temp2, temp3) values as the row variables. However I would like to
have the temp variables *aggregated into single rows* so that I have the
frequency ("Freq" | counts) of each time each "delayValue" occurs
2004 Sep 28
3
sapply behavior
Hi,
I use sapply very frequently, but I have recently noticed a behavior of
sapply which I don't understand and have never seen before. Basically,
sapply returns what looks like a matrix, says it a matrix, and appears to
let me do matrix things (like transpose). But it is also a list and behaves
like a list when I subset it, not a vector (so I can't sort a row for
instance). I
2003 Nov 23
4
remove 0 rows from a data frame
Dear all,
As part of a larger function, I am randomly removing rows from a data
frame. The number of removed rows is determmined by a Poisson distribution
with a low mean. Sometimes, the random number is 0, and that's when the
problem starts:
My data frame:
> temp
occ x y dbh age
801 0 2977.196 3090.225 6 36.0
802 0 2951.892 3083.769 8 40.6
803 0 2919.111
2006 Jan 04
3
matrix math
I am using R 2.1.1 in an windows XP environment.
I have 2 dataframes, temp1 and temp2.
Each dataframe has 20 variables (“cocolumns") and 525 observations (“rows”). All variables are numeric.
I want to create a new dataframe that also has 20 columns and 525 rows. The values in this dataframe should be the sum of the 2 other dataframe.
(i.e. temp1$column
2012 Sep 28
2
Converting array to matrix
Hi,
I have a 3d array as below, I want to make this array to a matrix of p=50(rows) and n=20(columns) with the coverage values .
The code before the array is:
library(binom)
Loading required package: lattice
pi.seq<-seq(from = 0.01, to = 0.5, by = 0.01)
no.seq<-seq(from = 5, to = 100, by = 5)
cp.all = binom.coverage( p = pi.seq, n = no.seq , conf.level = 0.95, method = "exact")
2007 Jan 30
2
rbind-ing list
hi,
i have a list of data.frame that has same structure. i would like to know a
efficient way of rbind-ing it.
right now, i write:
n = length(temp) # 'temp' is a list of data.frames
temp2 = data.frame()
for (i in 1:n) temp2 = rbind( temp2, temp[[i]])
return(temp2)
but this is not an efficient way since we keeping overwriting temp2. i
wonder if there's faster way.
thanks
--
2010 Apr 06
3
[LLVMdev] How to get the left-hand operand of an instruction?
Hi,
I am a new novice of LLVM, and I want know how to get the left-hand operand
of an instruction?
For example:
how to get the %temp2 operand in the next instruction:
%temp2 = malloc i8, i32 %n
Thanks a lot!
Best Regards!
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2009 May 28
2
Replace is leaking?
Okay, someone explain this behaviour to me:
Browse[1]> replace(rep(0, 4000), temp1[12] , temp2[12])[3925]
[1] 0.4462404
Browse[1]> temp1[12]
[1] 3926
Browse[1]> temp2[12]
[1] 0.4462404
Browse[1]> replace(rep(0, 4000), 3926 , temp2[12])[3925]
[1] 0
For some reason, R seems to shift indices along when doing this replacement.
Has anyone encountered this bug before? It seems to crop up
2011 Jun 17
3
rle on large data . . . without a for loop!
I think need to do something like this:
dat<-data.frame(state=sample(id=rep(1:5,each=200),1:3, 1000,
replace=T,prob=c(0.7,0.05,0.25)),V1=runif(1,10,1000),V2=rnorm(1000))
rle.dat<-rle(dat$state)
temp<-1
out<-data.frame(id=1:length(rle.dat$length))
for(i in 1:length(rle.dat$length)){
temp2<-temp+rle.dat$length[[i]]
out$V1[i]<-mean(dat$V1[temp:temp2])