Displaying 20 results from an estimated 10000 matches similar to: "rJython matrix message"
2011 May 17
5
Email out of R (code)
Hi all,
I thought I would post code to send an email out of R. The code uses
Grothendieck and Bellosta's interface package rJython for executing Python
from R. The code itself provides basic email functionality for email servers
requiring authentication. It should be easy to extend it (e.g., for sending
attachments). I hope it's useful.
require(rJython)
rJython <- rJython()
2011 Dec 11
2
Encoding y (r)Jython.-
Hola,
Tengo un problemillo con el encoding de unas palabras y trabajarlas en R
por medio de rJython.
Os explico: cuando quiero utilizar cualquier dato que contenga acentos o
eñes o cualquiera de estos caracteres que no usan los angloparlantes
obtengo un error. Ejemplo, en R:
> jython.call(rJython,''ascii'',''señoría'')
Error en jython.exec(rJython,
2013 Sep 12
1
problem with rJython and modules
Dear R People:
I have been experimenting with rPython, rSymPy, and rJython. Here is my
latest snag:
> library(rJython)
Loading required package: rJava
Loading required package: rjson
> library(rSymPy)
> rJython <- rJython()
> x <- "x"
> y <- "y"
> rJython$exec("from sympy import *")
Error in .jcall("RJavaTools",
2011 Aug 29
1
character vector to text with returns
Hello,
Does anyone know how to convert this:
> msg
[1] "a"
[2] "b"
[3] "c"
To:
> msg
"a
b
c"
In other words, I need to convert a character vector to a single string with
carriage returns for each row.
Functionally, I'm attempting to send an email of a character vector in a way
that is readable in the email body. I can only input one
2011 May 24
4
"Alpha testers" para el paquete rPython
Hola, ¿qué tal?
Estoy buscando "alpha testers" para mi paquete rPython. El paquete es
la evolución natural de rJython, un paquete de R que permite llamar a
Jython, el dialecto de Python que corre sobre la máquina virtual de
Java, desde R.
rPython permite llamar al verdadero Python. Funciona perfectamente en
mi máquina, pero necesito ver qué problemas de instalación y uso
aparecen en
2004 Feb 27
2
Packages in R & Java
Yes, lots of packages do use C/Fortran code ... it would be great if there
were more packages that are "pure R" especially since the advent of S4
classes and namespaces.
Is it worth suggesting that we create a designation "pure R" for packages
that have no external source code and encourage more of these? Indeed, now
the number of packages is so big could they be classified to
2010 Dec 12
1
R <-> Haskell
I'd like to develop, if there is not one already, an interface between R
code and Haskell code, to allow R code to call Haskell (compiled) code, and
vice-versa. But in the interest of not reinventing the wheel, does anyone
on this list know of existing bindings for Haskell code?
There is support for loading plugins in Haskell, and for an eval() like set
of functions provided by the Haskell
2011 Sep 27
3
remove NaN from element in a vector in a list
Hello,
What is the best way to turn a matrix into a list removing NaN's? I'm new to
R...
Start:
> mt = matrix(c(1,4,NaN,5,3,6),2,3)
> mt
[,1] [,2] [,3]
[1,] 1 NaN 3
[2,] 4 5 6
Desired result:
> lst
[[1]]
[1] 1 3
[[2]]
[1] 4 5 6
Thanks!
Ben
[[alternative HTML version deleted]]
2009 Jul 20
0
[LLVMdev] x86 unwind support[MESSAGE NOT SCANNED]
On Mon, Jul 20, 2009 at 7:43 AM, Nick
Johnson<nicholas.paul.johnson at gmail.com> wrote:
> On Mon, Jul 20, 2009 at 10:09 AM, Mark Shannon<marks at dcs.gla.ac.uk> wrote:
>> Andrew Haley wrote:
>> If you can make your point without any references to any C/C++ specific
>> features it might be more convincing ;)
>>
>
> I did. Recall my mention of
2011 Sep 02
2
previous monday date
Hello,
I'm attempting to return the date (in form '%Y-%m-%d') of the Monday
previous to the current date. For example: since it is 2011-09-02 today, I
would expect 2011-08-29 to be the return value.
I found the following in:
http://www.mail-archive.com/r-help@r-project.org/msg144184.html
Start quote from link:
prevmonday <- function(x) 7 * floor(as.numeric(x-1+4) / 7) +
2009 Mar 25
5
[Cucumber] ANN: Cucumber with pure Java
Big news for all Java programmers out there.
Now you can use Cucumber with pure Java!
That''s right, you don''t have to write a single line of Ruby! (1)
All of your step definitions can be written as annotated methods in POJOs
(Plain Old Java Objects).
To get a taste of what this looks like, check out the simple example in the
cucumber_java project on GitHub:
* README for
2011 Oct 12
1
Tinn-R change editor background color
Hello,
Does anyone know how to change the Tinn-R editor background color? White is
rough on the eyes...
Thanks,
Ben
[[alternative HTML version deleted]]
2011 Aug 23
1
R.oo modify an object inside another classes method
Can someone show me how to modify one (R.oo) class's object inside another
(R.oo) class's method? Is that possible with the R.oo package? A quick
example or reference to an example would be outstanding...
Thanks,
Ben
[[alternative HTML version deleted]]
2011 Sep 10
1
DBS to R
Hello,
I have a bunch of data files all with "dbs" file extensions. They are
generated via a SQL query from another program and source. Does anyone know
(or have ideas) how to get the data from a dbs file type into R (or into
some other format that can imported to R)? I've searched online for 4 hours
now...
Thanks!
Ben
[[alternative HTML version deleted]]
2011 Oct 11
1
apply for each value
Hello,
There has to be a more R'ish way to do this. I have two matrices, one has
the values I want, but I want to NA some of them. The other matrix has
binary values that tell me if I want to NA the values in the other matrix. I
produce a third matrix based on this. I've also tried apply() passing in
c(1,2) for rows and columns with no success yet.
Example (this works, but I'm
2011 Oct 06
1
counts in quantiles in and from a matrix
Hello,
I'm trying to get the count of values in each row that are above and below
quantile thresholds. Thanks!
Example:
> x = matrix(1:30,5,6)
> x
[,1] [,2] [,3] [,4] [,5] [,6]
[1,] 1 6 11 16 21 26
[2,] 2 7 12 17 22 27
[3,] 3 8 13 18 23 28
[4,] 4 9 14 19 24 29
[5,] 5 10 15 20 25 30
> qtl = t(apply(x, 1,
2011 Mar 04
1
Multi-line input to rsympy
Dear R users,
I have been using rsympy to solve a set of simultaneous equations from
R. There are two solutions for the variable I'm interested in, xx[0] and
xx[1], which are in terms of symbols called lam and conc. I'd like to
pick out the one which is positive at (lam=0, conc=0) and call it mysol.
In python I could write:
if (xx[0].subs(lam,0)).subs(conc,0)>0:
mysol=xx[0]
2011 Oct 11
1
high and lowest with names
Hello,
I'm looking to get the values, row names and column names of the largest and
smallest values in a matrix.
Example (except is does not include the names):
> x <- swiss$Education[1:25]
> dat = matrix(x,5,5)
> colnames(dat) = c('a','b','c','d','c')
> rownames(dat) = c('z','y','x','w','v')
>
2011 Sep 22
1
R.oo: do work on data member at construction
Hello,
I'd like to 'do work' on data members upon construction (i.e. without
implementing it in a get method). Is this the best way to create data member
'z' upon construction? I'm thinking if .z=paste(x,y) below gets more complex
I'll run into issues.
setConstructorS3("MyClass", function(x=NA,y=NA,...) {
this <- extend(Object(), "MyClass",
2011 Aug 08
1
R.oo error upon construction
Hello,
Using the R.oo package, how do I throw an error if a field is not present
when the user of the class creates the object?
Using the example in the R.oo package:
setConstructorS3("Person", function(name, age) {
if (missing(name)) name <- NA;
if (missing(age)) age <- NA;
extend(Object(), "Person",
.name=name,
.age=age
)
})
[rest of class methods