Hi all, let say I have following matrix:
> Dat <- matrix(1:30, 5, 6); colnames(Dat) <- rep(c("Name1", "Names2"), 3)
> Dat
Name1 Names2 Name1 Names2 Name1 Names2
[1,] 1 611 1621 26
[2,] 2 712 1722 27
[3,] 3 813 1823
Dear all, I have been given a data something like below:
Dat = "2 3 28.3 3.05 8 3 3 22.5 1.55 0 1 1 26.0 2.30 9 3 3 24.8 2.10 0
3 3 26.0 2.60 4 2 3 23.8 2.10 0 3 2 24.7 1.90 0 2 1 23.7 1.95 0
3 3 25.6 2.15 0 3 3 24.3 2.15 0 2 3 25.8 2.65 0 2 3 28.2 3.05 11
4 2 21.0 1.85 0 2 1 26.0 2.30 14 1
Dear all, the company I work for has Matlab installed for
statistical/mathematical calculations and really not ready to go with R
(even installing exe file for R). Therefore I was wondering is it possible
to do analysis R using browser like IE, without installing anything?
Thanks for your sugge
Dear all, can somebody please update me on what could be the best editor to
write and edit the RD files? I need to something with syntax highlighter,
auto-completion etc (like Notepad++ for R etc.). Currently I am using plain
Notepad however expect something which could be more professional.
T
Dear all, I have a system of simultaneous equations with 2 unknowns as
follows:
x*y + (1-x) = 0.05
x*(y - .5)^2 + (1-x)*0.6 = 0.56^2
Ofcourse I can do it manually however wondering whether there is any direct
way in R available to get the solution of this system?
Thanks and regards,
Dear all, when I look at the internal of mapply() function, I see a line of
code:
answer <- .Call("do_mapply", FUN, dots, MoreArgs, environment(),
PACKAGE = "base")
Can somebody please tell me how to find the source code of 'do_mapply'
Thanks,
[[alternative HTML vers
Sorry that forgot to put R-forum in the loop...
-Original Message-
From: Bogaso Christofer [mailto:bogaso.christo...@gmail.com]
Sent: 23 September 2011 22:53
To: 'Prof Brian Ripley'
Cc: 'leighton155'
Subject: RE: [R] ARIMA - Skipping intermediate lag
Dear Prof. Repley, may I know in details why ignoring intermediate lags are
sin? How the statistical properties will be worse than not ignoring them? If
I am correct then, ignoring some parameters means we know the population
values for them. Therefore in this case, my MSE estimate should be smalle
Hello Bolker, Hope you will make available at least the problem and
reasoning to this list. I am also very much interested to see the problem
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Ben Bolker
Sent: 06 September 2011 02:58
To
Dear all, if I want to install a package in windows system then generally I
use the 'install package(s) from local zip files' from the 'package' menu.
However I am interested to know that whether there is any syntax which I can
use in the R console instead. I have tried with
install.packages("__pac
Thanks Joshua and Berton for your pointers. Yes it was typo as I wanted to mean
to select few columns.
-Original Message-
From: Joshua Wiley [mailto:jwiley.ps...@gmail.com]
Sent: 22 July 2011 22:02
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] Indexing problem with
Dear all, assume I have a matrix with just 1 row. Now suppose I want to
fetch 1st few rows from that matrix, however resulting object becomes
vector. Here is 1 such example:
> matrix(1:5, 1)
[,1] [,2] [,3] [,4] [,5]
[1,]12345
>
> matrix(1:5, 1)[,-1]
[1] 2 3 4 5
Hi all, I have a lengthy 'for' loop and for each loop I want to track the
iteration number that is currently going on. For this, I have tried
following:
> for (i in 1:10) {
+ DumDat <- rnorm(1000)
+ cat("iteration:", i, " \n")
+ }
iteration: 1
iteration: 2
iteration: 3
iteration: 4
Hi all, I was trying to install rJava package (some older version) from
source. However could not achieve using "Rcmd build -binary rJava" syntax
with windows cmd. The building process stopped with following error:
ERROR*> JavaSoft\{JRE|JDK} can't open registry keys.
ERROR: cannot find Java D
t: 07 July 2011 21:54
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] Working with string
On Jul 7, 2011, at 11:21 AM, Bogaso Christofer wrote:
> Hi there, I have to extract some relevant portion from a defined
> string, which is a mix of numeric and character. However this
Hi there, I have to extract some relevant portion from a defined string,
which is a mix of numeric and character. However this has following
sequence:
Some String - Some numerical - "c/C" (or "p/P") - then again some set of
numbers.
Examples of such string is "fdahsdfcha163517253c463278643"
Dear all, I have created a new S4 class with name "MyClass". Please see
below for it's definition. Now I want to create a
method for the show() function for this class. In defining this method, what
I want is, once user would like see an object of this class
some values will be displayed. Then R wi
Hi Greg, please forgive me as I could not understand one part of your
wishful reply. You said: "distributions where one is uniform between 0 and 1
with height 1; the other also has height 1 between 0 and 0.99, but is also 1
between 999.99 and 1000, zero elsewhere. " Can you be more specific on this
Hi all, please consider this plot:
xx <- seq(4, 0.01, by = -0.04)
yy <- rnorm(xx)
plot(xx, yy, type="l")
Here you see my original 'xx' was in decreasing order, however R puts it in
the increasing order. I understand that in any plot x and y axis grow is
increasing order, however I am wond
Dear all, let say, I have following list object:
listObj <- vector("list", length = 3)
listObj[[1]] <- rnorm(3)
listObj[[2]] <- rnorm(4)
listObj[[3]] <- rnorm(5)
Now I want to convert above list into a Matrix. Ofcourse I can do it using
"Reduce("rbind", listObj)". However as you notice t
Here, I have following generic function:
Fn1 <- function(x) {
return(x) # assume x is calculated in previous steps
.
return(y) # assume y is calculated in previous steps
..
Hi all, I generally use the Reduce() function to reduce the dimension of
list object. However in my current session I have few objects which are
actually list of list of list..(say n step). If I reduce their dimension
then I have call Reduce() function many times. Therefore my question is, is
there
tand how I am getting those values. Would you
please help on how those numbers are coming?
Thanks and regards,
-Original Message-
From: Henrique Dallazuanna [mailto:www...@gmail.com]
Sent: 07 April 2011 23:36
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] An extention o
Dear all, as per my understanding, outer() function is to facilitate
2-dimensional function evaluation, like to evaluate f(x,y) for different
values of x and y. However I have slightly modified version of that, where x
is a matrix with, say, 5 rows and 2 columns and y is a vector. Let take
followin
Dear all, please consider my following workbook:
library(zoo)
lis1 <- vector('list', length = 2)
lis2 <- vector('list', length = 2)
lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1)
lis1[[2]] <- zooreg(rnorm(20), start = as.yearmon("2010-01-01"), frequency =
12)
Dear all, please consider my following workbook:
library(zoo)
lis1 <- vector('list', length = 2)
lis2 <- vector('list', length = 2)
lis1[[1]] <- zooreg(rnorm(20), start = as.Date("2010-01-01"), frequency = 1)
lis1[[2]] <- zooreg(rnorm(20), start = as.yearmon("2010-01-01"), frequency =
12)
Dear all, can somebody guide me how to install the package RQuantLib, for
which windows binary is not available. I have tried installing it with R CMD
INSTALL in my windows vista machine (I have Rtools installed), however it
stopped due to an error saying: "compilation failed for package
'RQuantLib
example other than Date class which R forcefully changes to some simpler
class if it placed within a matrix?
Thanks and regards,
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: 12 March 2011 02:46
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re
Dear all, when I put date objects (class of 'Date') in a matrix it becomes
numeric:
> dat <- matrix(seq(as.Date("2011-01-01"), as.Date("2011-01-09"), by="1
day"), 3)
> dat
[,1] [,2] [,3]
[1,] 14975 14978 14981
[2,] 14976 14979 14982
[3,] 14977 14980 14983
> class(dat[1,1])
[1] "nume
Hi there, I have a numeric vector let say:
Vect <- c(12.234, 234.5675, 1.5)
Now I want a string vector like:
changedVec <- c("012.234", "234.568", "001.500")
Would be grateful if somebody help me how can I do that.
Thanks and regards,
[[alternative HTML version deleted
I have got another question on defining a method for print() function for my
s4 class. Here is my class definition as well as what I have done till now:
> setClass("Me", representation(x1 = "numeric", x2 = "numeric", y1 =
"character"))
[1] "Me"
> setMethod("print", "Me", definition=function(x
Sent: 06 February 2011 03:57
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] Seeking help to define method for '+'
On 02/05/2011 02:19 PM, Bogaso Christofer wrote:
> Dear all, I am trying to define "+" method for my newly defined s4 class
> which is as fol
Dear all, I am trying to define "+" method for my newly defined s4 class
which is as follows:
setClass("Me", sealed=F,representation(x1 = "numeric", x2 = "character"))
new1 <- new("Me", x1=2, x2="comment1")
new2 <- new("Me", x1=3, x2="comment1")
setMethod("+", "Me", definition=function(x,
Can somebody tell me that, if I do some arithmetic calculation over 2
matrices then how the column names and row names are preserved? It seems
that, for multiplication, column names and row names of the 2nd matrix are
preserved and for additional, there seems not having any explicit rule:
> set
=3:5)
Error in get(names(list(...))) : object 'zz' not found
As you see, still I am far from the solution. How to pass the value of "..."
for further calculation?
Thanks,
-Original Message-
From: Eik Vettorazzi [mailto:e.vettora...@uke.uni-hamburg.de]
Sent: 01 Februa
Hi all, suppose I have following user defined function:
fn1 = function(x, y, ...) {
z <- x+y; u=y^2
# if something with name "add" exists in the
function argument then do some calculation and return that calculated value,
NOT z
;. Similarly other two.
Hope I could be able to make my intentions clearer.
Any idea how I can achieve that?
Thanks,
-----Original Message-
From: David Winsemius [mailto:dwinsem...@comcast.net]
Sent: 01 February 2011 00:13
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] From data frame to
us [mailto:dwinsem...@comcast.net]
Sent: 31 January 2011 23:26
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] From data frame to list object
On Jan 31, 2011, at 1:03 PM, Bogaso Christofer wrote:
> Dear all, let say I have following data frame:
>
>
> dfrm <- dat
Dear all, let say I have following data frame:
> data.frame(x=rnorm(18), y=rep(c("a", "b", "c"), each=6))
x y
1 -1.072152537 a
2 0.382985265 a
3 0.058877377 a
4 -0.006911939 a
5 -2.355269051 a
6 -0.303095553 a
7 0.484038422 b
8 0.733928931 b
9 -1.136014346 b
make print.anova() asterisked?
Thanks and regards,
-Original Message-
From: jim holtman [mailto:jholt...@gmail.com]
Sent: 21 January 2011 18:20
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject: Re: [R] How to look into the asterisked function?
You can also use:
getAnywhere
Hi friends, there is methods() function to see the all available methods for
a particular function, for example:
> head(methods("print"))
[1] "print.acf" "print.anova" "print.aov" "print.aovlist"
"print.ar" "print.Arima"
In this list, there are some functions which are ast
Thanks Gabor and other for their input. I admit that I must have placed some
reproducible codes on what I wanted. However it was actually in my mind
however I restrained because it was not any R related query rather a general
Statistics related.
Here I am using dummy variables in ***Time series co
-way to doing this?
If I understand your question
properly, then you are looking
for 'try' or 'tryCatch'. There
is an example of using these on
page 89 of 'The R Inferno'.
On 23/12/2010 04:13, Bogaso Christofer wrote:
> Dear friends, hope I could be able to explai
Dear friends, hope I could be able to explain my problem through following
example. Please consider this:
> set.seed(1)
> input <- rnorm(10)
> input
[1] -0.6264538 0.1836433 -0.8356286 1.5952808 0.3295078 -0.8204684
0.4874291 0.7383247 0.5757814 -0.3053884
> tag <- vector(length=10)
Thanks Mark, for sharing such a great article. Really feeling proud that I
am also part of that great community. BTW can anyone share the code on how
to draw the picture displayed there (blur surface plot)?
Thanks,
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun.
Dear all, I was doing an experiment to disprove some theory therefore
performing lot of random simulation. Goal is to show the audience that
although something has very rare chance to occur but it doesn't mean that
event would be impossible.
In this case after getting that rare event I need to
Hi, there is a function Skewness() under fBasics package. If I type
"skewness", I get followings:
> skewness
function (x, ...)
{
UseMethod("skewness")
}
Would be great if someone tell me how to see the codes of this function.
2ndly suppose I create following function:
fn1
Hi all, can anyone please guide me how to create a sequence of months? Here
I have tried following however couldn't get success
> library(zoo)
> seq(as.yearmon("2010-01-01"), as.yearmon("2010-03-01"), by="1 month")
Error in del/by : non-numeric argument to binary operator
What is the cor
Thanks Gabor for your input. However my question is, is your solution
general for any value of "a" and "b?"
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: 11 July 2010 00:42
To: Bogaso Christofer
Cc: r-help@r-project.org
Subject:
Hi all, please see my code:
> library(zoo)
> a <- as.yearmon("March-2010", "%B-%Y")
> b <- as.yearmon("May-2010", "%B-%Y")
>
> nn <- (b-a)*12 # number of months in between them
> nn
[1] 2
> as.integer(nn)
[1] 1
What is the correct way to find the number of months between "a" and
Hi Ravi, your suggestion helped me as well a lot. If I look into that
function, I see this function is calling another function :
.Call("doCubature", as.integer(fDim), body(f.check),
as.double(lowerLimit), as.double(upperLimit), as.integer(maxEval),
as.double(absError), as.doubl
Dear all, is there any R implementation on the Multivariate binomial
distribution like calculate the value of p.m.f., drawing random sample from
it etc.
Thanks,
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https
When the version 2.12 is issued? Is it available for download (windows
version)? Currently I am using the version 2.11.1
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of skan
Sent: 19 June 2010 19:10
To: r-help@r-project.org
Subject:
53 matches
Mail list logo