Displaying 20 results from an estimated 800 matches similar to: "substring and paste character with a for loop"
2012 Feb 01
6
While loop working with TRUE/FALSE?
Hi R users,
is there any possibilty that a while loop is working like that:
z <- c(0,1,2,3,4,5,6,7,8,9)
r <- 7
while(w == T) {
for ( i in 1:10 ){
w <- r == z[i]
print(w)
}
}
The loop should stop if w == TRUE
best regards
--
View this message in context:
2008 Nov 10
2
Make one vector from matrix comparison
Hello R-users,
I have a little problem.
I compare each row of a matrix with each row of another matrix.
testmat1 <- matrix(c(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16), nrow=4)
testmat2 <- matrix(c(1,2,3,5,5,6,7,8,9,10,11,12,13,14,15,16), nrow=4)
Both matrix differs in the last row.
Now I create a loop:
for (i in (1:4)){
for (j in (1:4)){
b <- (c(setequal(testmat1[j,],testmat2[i,])))
2011 Nov 15
2
points() colored by value
Hi R users,
I want to colored points by their value
for example:
x <- c(1,2,3,4)
y <- c(1,2,3,4)
z <- c(2,3,4,9)
y and x are coordinates
z is the value of the coordinates
points(x,y,col= rainbow(z))
something like that
But haven't found any solution at the moment.
Thanks.
Chris
--
View this message in context:
2008 Oct 22
3
Substitute problem
hello R users,
I didn't find a solution for a special problem.
I have two dataframes.
dataframe1:
X value row col ID
1 8.973498062 5512625 3460000 1
2 11.656658570 5501625 3464000 2
3 11.121777570 5495625 3473000 3
4 9.310465964 5508625 3477000 4
5 8.883483845 5515625 3496000 5
dataframe2:
X value
2014 Apr 14
2
[LLVMdev] PR17975 and trunk
Hi,
PR17975 was caused by r191059 which was reverted on the 3.4 branch in
r196521. However, the problem still occurs with trunk (confirmed as
of r206186).
>From a thread on cfe-commits I see that Kai Nacke (the author of
r191059) was working on a patch to fix PR17975, but the conversation
ends:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20131202/197968.html
So my question
2008 Sep 17
1
Re adout row and column of a matrix value
Hello R users,
I want to readout the row and column postion from a certain matrix value
into a csv file.
I have only found this syntax
"which(a == b, arr.ind = T)"
so I get
a = matrix
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1 1 2 2 2 1 1 2
[2,] 1 2 3 3 3 4 4 3
[3,] 3 3 3 5 5 6 5 4
[4,] 4 4 4 3
2008 Nov 25
1
add string to a list
hello R users,
I didn't find a solution for a simple problem I think.
I read 224 lines from a file
input <- readLines(con,n=224)
and now I create a string x <- "\004" which should be line 225 of input.
So I have input and x and want to add x to input, so that it looks like
this:
[1] "string"
[2] "string"
.
.
.
[224] "string"
[225]
2013 Apr 16
2
R process slow down after a amount of time
Hi R users,
I have mentioned that R is getting slower if a process with a loop runs for
a while. Is that normal?
Let's say, I have a code which produce an output file after one loop run.
Now after 10, 15 or 20 loop runs the time between the created files is
stongly increasing.
Is there maybe any data which fill some memory?
Chris
--
View this message in context:
2011 Sep 16
3
How to save row values from a matrix into one vector?
Dear R users,
I guess, I have a quit simple problem, but I'm not getting the solution.
I create a matrix like this:
test <- matrix(seq(1,3,1),ncol=5,nrow=3)
then I want to create one vector, consisting of every row of the matrix.
My first idea was to do this with a for loop.
op <- vector()
for (o in 1:3){
op[o] <- as.vector(test.id[o,])
}
The results should be like this:
[1]
2013 Jan 01
0
[LLVMdev] IR function pointers
Hi,
> For example: call void %1608(%"struct.LRT::RGBAucharFrameBuffer"*
> %1604)
>
> How can I resolve the targets of these? Also, why are they appearing as
> indirect calls in the IR, when they are direct calls in the source?
You don't mention what language you're trying to compile, though it looks
plausibly C++. I'd guess these are virtual function calls.
2008 Sep 21
1
Searching a relativ maximum of a matrix
Hello R users,
is there a possibility to get the relativ maximum of a matrix?
To get the absolut maximum I use max(matrix)
For example:
The absolut maximum of this matrix is 6[3,6], but the relativ maximum is
6[3,6] and 4[7,6], because both values are the highest value in comparison
to their eight neighbours values.
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1 1 2 2 2
2024 Mar 04
1
[External] Re: capture "->"
It seems like you want to use -> and <- as arrows with different meanings
to "A gets the value of B" in your package, as a means of writing
expressions in your package language.
Another possibility would be to use different symbols instead of the
problematic -> and <-, for example you could use <.~ and ~.> which are not
at all flipped or changed before you get a chance
2013 Jan 01
2
[LLVMdev] IR function pointers
I am coming up against a lot of function pointers in the IR, although
the corresponding source code does not have indirect calls.
For example: call void %1608(%"struct.LRT::RGBAucharFrameBuffer"* %1604)
How can I resolve the targets of these? Also, why are they appearing as
indirect calls in the IR, when they are direct calls in the source?
Thanks.
-Apala
2008 Jul 23
2
Flip Matrix form file?
Hello,
I have a problem to flip a 200x200 matrix, which is imported by a .asc file.
I want to flip the matrix like in a created example below:
> b <- matrix(1:9,3,3,byrow=T)
> b
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 4 5 6
[3,] 7 8 9
> b1 <- apply(t(b),1,rev)
> b1
[,1] [,2] [,3]
[1,] 7 8 9
[2,] 4 5 6
[3,] 1 2 3
but my
2024 Mar 04
1
[External] Re: capture "->"
Dear Barry,
In general, I believe users are already accustomed with the classical
arrows "->" and "<-" which are used as such in quoted expressions.
But I agree that "-.>" is a very neat trick, thanks a lot. A small dot,
what a difference.
All the best,
Dmitri
On Mon, Mar 4, 2024 at 11:40?AM Barry Rowlingson <
b.rowlingson at lancaster.ac.uk> wrote:
2024 Mar 04
1
[External] Re: capture "->"
Maybe someone has already suggested this, but if your functions accepted
strings you could use sub or gsub to replace the -> with a symbol that
parsed at the same precedence as <-,
say <<-. Then parse it and deal with it. When it is time to display the
parsed and perhaps manipulated formulae to the user, deparse it and do the
reverse replacement.
> encode <-
2011 May 06
1
dovecot+shared folders
Hi all.
I have dovecot 1.2.15 on debian + mysql+shared folders.
My config
login_process_size = 128
login_processes_count = 10
login_process_per_connection = no
login_max_connections = 3000
login_max_processes_count = 1000
mail_process_size = 1024
protocols = imap imaps pop3 pop3s managesieve
protocol managesieve {
login_executable = /usr/lib/dovecot/managesieve-login
mail_executable =
2012 Jul 10
1
image.plot transparent?
Hi R users,
I have a maybe strange problem.
Normaly I do image.plot() with x,y coordinates and add=T and if I have some
NA values in my data matrix z, the color will be transparent of these
pixels.
But now I have a disorted coordinate system and x,y are a matrix. It works
also fine, but now NA values are white colored and not transparent anymore.
It is problematic if I have a secondary
2006 Sep 30
3
fixmodule patches
These patches (should) give us support for compiling against Ruby 1.9.
Roy
_______________________________________________
wxruby-users mailing list
wxruby-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/wxruby-users
2006 Dec 06
1
POSIX and summer savings time
I have a time stamp in UTC (GMT) time:
> format(ISOdatetime(1970,1,1,0,0,0)+1165398135729/1000,"%Y-%m-%d
%H:%M:%OS3")
"2006-12-06 09:42:18.823" (note millisecond accuracy, but not relevant
to question here)
Now, this time stamp actually "happened" at local (Swedish) time one
hour later (10:42).
Regarding summer/winter adjustments in time ("spring