Displaying 20 results from an estimated 31 matches for "matzmoto".
2006 Feb 05
3
reading in a tricky computer program output
Hi R user
I need to read in some values from a computer program output.
I can't change the output format because the developer of the program
doesn't allow to change the format of output.
There are two formats.
First one looks like this
if I have 10 variables,
------------------------------------------------------------------------------------------------------
[ 1]
2006 Nov 06
3
CPU or memory
Hi R users
Having both a faster CPU and more memory will boost computing power. I was
wondering if only adding more memory (1GB -> 2GB) will significantly reduce
R computation time?
Taka,
_________________________________________________________________
Get FREE company branded e-mail accounts and business Web site from
Microsoft Office Live
2006 Feb 07
1
(second round) creating a certain type of matrix
...ngth.of.rand.numbers-1
mat[((start):end), i]<- my.rand.num
}
mat
}
Do you (any R users) have any suggestion to this function to make this
function work better or efficiently?
Taka
It works but I
>From: "Petr Pikal" <petr.pikal at precheza.cz>
>To: "Taka Matzmoto" <sell_mirage_ne at hotmail.com>,r-help at stat.math.ethz.ch
>Subject: Re: [R] creating a certain type of matrix
>Date: Tue, 07 Feb 2006 08:58:59 +0100
>MIME-Version: 1.0
>Received: from mail.precheza.cz ([80.188.29.243]) by
>bay0-mc8-f13.bay0.hotmail.com with Microsoft S...
2006 Jun 27
3
looking for a more efficient R code.
Dear R-users
I have four simple linear models, which are all in the form of a*X+b
The estimated parameter vectors are
a <- c(1,2,3,4)
b <- c(4,3,2,1)
My goal is to draw a plot where x-axis is X (range from -100 to 100) and
y-axis is the sum of
all four linear models
X <- seq(-100,100, length=10000)
plot(X, sum of the four linear functions)
I started with a function for summing
2006 Feb 05
2
generating strings in a tricky order
Hi R users
I like to generate some strings (a character vector) in a special way like
If i have 5 variables
"002.001",
"003.001", "003.002",
"004.001", "004.002", "004.003",
"005.001", "005.002", "005.003", "005.004"
so the created string vector's elements are
"002.001",
2006 Feb 08
3
difference between rnorm(1000, 0, 1) and running rnorm(500, 0, 1) twice
Hi R users
This looks a simple question
Is there any difference between between rnorm(1000,0,1) and running
rnorm(500,0,1) twice in terms of outcome ?
TM
2006 Feb 14
2
combine elements of a character vector into a character
Hi R users
I have a simple question to ask
x <- c("a","b","c")
x
[1] "a" "b" "c"
I like to have "abc" instead of having "a" "b" "c"
I tried to use paste and other functions related to character.
Is there any function (command) that enable me to combine elements of a
character vector into
2006 Feb 18
2
figure out whether 1 is between two numbers
Hi R users
I have two variables (X and Y)
X <- rnorm(100,.7,.5)
Y <- rnorm (100,.3,.1)
I like to know whether 1 is between each pair of X and Y or not.
Thanks
TM
2006 Jun 30
2
incomplete final line found by readLines on ...
Dear R-users
I need to read some text files produced by some other software.
I used readLines (with n = -1 ) command and then tried to find some numbers
I liked to extract or some line numbers I like to know.
The problem is that there is no empty line at the end of the text files.
R gave me this warning below;
In addition: Warning message:
incomplete final line found by readLines on
2006 Jan 27
3
[Q] extracting lower diagonal elements of a matrix
Hi R users
I like to extract lower diagonal elements of a matrix in such a way like,
data[1,2], data[1,3],
...., data[5,6] are extracted from a matrix called 'data'
This short script below is what I have written so far.
##########################################
data <- matrix(rnorm(36,0,1),nrow=6)
temp<-c()
for (i in 1:(nrow(data)-1))
{
for (j in (i+1):nrow(data))
{
2006 Jul 11
2
0* log(0) should be zero but NaN
Dear R-users
>prob <- c(0.5,0.4,0.3,0.1,0.0)
>cal <- prob * log(prob,base=2)
>cal
[1] -0.5000000 -0.5287712 -0.5210897 -0.3321928 NaN
Is there any way to change NaN to zero ?
I did come up with this by applying Ripley's relpy to my previous question
cal <-prob*log(pmax(prob,0.00000001),base=2)
Any suggestion ?
Thank you
Taka
2007 Jun 01
2
scan a directory and then make a string vector consisting of file names
Dear R-users,
I am looking for a way to scan a directory and then make a string vector
consisting of the file names in the directory.
For example, under c:\temp\
there are 4 files
a.txt, b.txt, c.txt, and d.txt
I would like to have a string vector
c("a.txt","b.txt","c.txt","d.txt")
How do I do that?
Thanks
Taka,
2006 Sep 24
2
s language version and complie languages
Hi R users
Which version of S does the current R version use? Venables and Ripley's
book (2000) says R is version 3 of S language. Is there any change since
2000 ?
I searched R-help archive for using C or C++ with R. Although there are some
postings, I am looking for up-to-date answers. Which one ( C and C++) works
better with R? What complier is the best suited for R ( gcc or visual
2006 Feb 04
2
saving a character vector
Hi R users
I wrote a function that generates some character strings.
generate.index<-function(n.item){
for (i in 1:n.item)
{
for (j in ((i+1):n.item))
{
cat("i",formatC(i,digits=2,flag="0"),".",formatC(j,digits=2,flag="0"),"\n",sep="")
}
}
}
I
2006 Sep 19
2
looking for some functions to analyze a data set.
Hi R-users
I have a data set. There are 10 products and the numbers of people who
ranked the products.
The format of the data set is
productID rank1 rank2 rank3 rank4 rank5 rank6 rank7 rank8 rank9 rank10
-------------------------------------------------------------------------------------------------------
1 10
2 3
3 6
4 2
5
2006 Aug 10
2
index.cond in xyplot
Dear R-users
I have 5 dependent variables (y1 to y5) and one independent variable (x) and
3 conditioning variables (m, n, and 0). Each of the conditioning variables
has 2 levels. I created 2*4 panel plots.
xyplot(y1+y2+y3+y4+y5 ~ x | m*n*o,layout = c(4,2))
I would like to reorder the 8 panels. I tried to use index.cond (e.g.,
index.cond = list(c(1,3,2,4,5,7,6,8)) but it didn't work out.
2006 Feb 17
2
creating 3-way tables for mantelhaen.test
Hi R users
I have serveral binary variables (e.g., X1, X2, X3, X4, X5, X,6, and X7) and
one continuous variable (e.g., Y1).
I combined these variables using data.frame()
mydata <- data.frame(X1,X2,X3,X4,X5,X6,X7,Y1)
after that, I sorted this data.frame
rank.by.Y1<-order(mydata[,8])
sorted.mydata<-mydata[rank.by.Y1,]
after that, I replaced Y1's values with values ranging from 1
2006 Feb 07
1
creating a certain type of matrix
Hi R users
I like to generate a certain type of matrix.
If there are 10 variables, the matrix will have nrow=10, ncol=((10/2))/5+1.
so the resulting matrix's dimension 10 by 2. If there are 50 variables the
dimension of the resulting matrix will be 50 by 6.
The arrangement of elements of this matrix is important to me and I can't
figure out how to arrange elements.
If I have 20
2006 Feb 02
1
table() command
Hi R users
I am trying to get cross-tabulation tables using tables.
All variables used are binary ones (0 and 1).
Each time I constructed cross-tabluation table using a different variable
pair (e.g., variable 1 and variable 2, variable 1 and variable 3 etc)
In doing so, I ran into some problems
i.V2
i.V1 1
0 17
1 33
For variable 2 (i.V2) there was no one belonging to ZERO
2006 Feb 17
1
extracting a element with a name attribute from a list
Hi R users
I like to extract (or collect) a numeric element with a name from a list.
Is there any way to extract just a numeric element without the name attached
to the element.
For example,
>mylist
Mantel-Haenszel chi-squared test with continuity correction
data: table(mydata[, x])
Mantel-Haenszel X-squared = 8.3832, df = 1, p-value = 0.003787
alternative hypothesis: true