. Then,
you need to learn the interface between R and Tcl for which there's a nice
(easy to find with Google) pdf document. If you really cannot find it,
I'll look it up for you.
JeeBee.
On Mon, 23 Oct 2006 12:11:40 -0200, Alberto Monteiro wrote:
This must be dumbest question ever asked
You can use list.files to obtain the file names, see
?list.files
Read the comma seperated values files with read.cvs, see
?read.csv
JeeBee.
On Tue, 24 Oct 2006 13:33:42 +0200, Antje wrote:
Hello,
I have the following problem. I have a set of CSV files and they are
named for a special
Dear list,
I have multiple (BWidget) listboxes in the same toplevel window.
The problem is, if I select (by left clicking) on one of those
listbox elements, the current selection in the *other* listboxes is
cleared!
Anybody knows how I can prevent this?
Here's my code (sorry not complete):
(E.g.
Sorry, the plot_linetypes[1] is a debugging leftover.
It's plot_linetypes[graph_idx] in my actual code ...
And plot_linetypes is just the sequence 1,2,3,4... etc
plotCI(
x = xvals.f[sorted],
y = yvals.f[sorted],
xlim = c(xmin, xmax), ylim = c(ymin, ymax),
pch =
Thanks, I tried using plotCI in the plotrix library.
This, however, gives me the below error.
CODE::
cat(x = ); print(xvals.f[sorted])
cat(y = ); print(yvals.f[sorted])
cat(pch = ); print(plot_symbols[graph_idx])
cat(lty = ); print(plot_linetypes[graph_idx])
cat(col
Great, why didn't I think of that.
Thanks :)
If you want to add lines as well as points, I think you will
have to use lines(x,y,type=b,lty = plot_linetypes[graph_idx]) in
addition to plotCI,
__
R-help@stat.math.ethz.ch mailing list
see ?apply
min.row - apply(X, 1, min)
min.col - apply(X, 2, min)
JeeBee
On Wed, 06 Sep 2006 01:37:22 -0700, Tong Wang wrote:
Hi,
Is there a function which operates on a matrix and return a vector of
min/max of each rol/col ?
say, X= 2, 1
3, 4
min.col(X)=c(2,1
Yes, there are many.
To give one example, you could consider using tcltk.
library(tcltk)
tkmessageBox(title=This is terrible,
message=What did you do?\nPromise not to do this again!,
icon=error, type=ok)
On Tue, 05 Sep 2006 23:10:41 +0200, Richard Müller wrote:
Hi all,
How about this?
http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=78
JeeBee
On Wed, 06 Sep 2006 18:19:28 +0800, gallon li wrote:
I intend to draw a plot of y against x. In the background of this graph I
wish to creat a histogram of the horizontal variable x. Does any expert
Look at:
?axis (try the examples)
Further, a nice example I found on this mailing lists archive,
from somebody who says this has been asked many times already :)
x - 1:10
y1 - 1:10
y2 - rev(seq(1,1000, length=10))
plot(x,y1,ann=FALSE)
axis(2, at=c(2,4,6,8), labels=as.character(c(2,4,6,8)))
gallon li wrote:
I have found this one before. However, my intension is slightly differing
from this plot: I wish to plot the histogram in the backgroun instead of
in the margin. Thanks anyway!
On Wed, 06 Sep 2006 12:29:51 +0200, JeeBee wrote:
How about this?
http://addictedtor.free.fr
See these two examples.
plot(1:2)
axis(4)
mtext(right y axis, side=4, line=-1.5)
par(mar=c(5,4,4,5)+.1)
plot(1:2)
axis(4)
mtext(right y axis, side=4, line=3)
Good luck finding the right combination again ;)
On Wed, 06 Sep 2006 20:08:43 +0800, gallon li wrote:
-- Forwarded message
I think you want something like this:
require(tcltk) || stop(Package tcltk is not available.)
version.BWidget - tclvalue(tclRequire(BWidget))
modify_command - function() {
print(Hey, I'm modified...)
}
tt - tktoplevel()
values = c(foo, bar, jeebee)
combo - tkwidget(tt
* problem) ?
Thanks in advance,
JeeBee.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained
Or, perhaps I can use Error(subject/(method * problem))
where subject = paste(method, problem)
Because I repeated each simulation several times for
different problems of the same problem.
This gives me the following output:
summary(aov(performance ~ method * problem + Error(subj/(method *
Hi Jessica,
I think you want to use names()
See:
?names
?colnames (or rownames)
If not, it's perhaps a good idea to send us a more complete example.
JeeBee.
On Fri, 04 Aug 2006 17:12:24 +0200, Jessica G. wrote:
How to convert a rowname vector of numbers into a real column of the matrix
so in the following example (single column, but my real data has
multiple columns) how do I get the row number of the last row of x
beyond which there are 10 or more 0's (which in this case is row#100).
x - as.matrix(c(rep(seq(1:20),5),rep(0,20)))
max( which(x 0) )
JeeBee
- matrix( data = NA, nrow = 5, ncol = 4 ) )
( m - f(row(m), col(m)) )
JeeBee.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide
]
# Add the column with the fractions
tmp2 - cbind(tmp1,
fracs=as.character(as.fractions(as.numeric(as.character(tmp1$V2)
# Finally hide that sort colum if you want
( tmp2[-2] )
# Everybody happy?
JeeBee
__
R-help@stat.math.ethz.ch mailing
Hi Muhammad,
How about this?
at - read.table(textConnection(a))
at2 - cbind(at, jeebee=as.character(as.fractions(as.numeric(at[,2]
sort.order - order(at2$V2)
at2[sort.order,]
at2[sort.order,c(1,3)]
JeeBee.
__
R-help@stat.math.ethz.ch mailing
.
Thanks,
Jeebee.
for(rek in seq(1,nrow(rekeningen))) {
arg - rekeningen$rekening[rek]
tkgrid(tkbutton(frame.1,
text=paste(Saldo historie, arg),
command=function() print(arg)),
sticky=news)
}
__
R-help@stat.math.ethz.ch mailing
Maybe this helps
( data1 = list(a=c(1,2), b=c(3,4), c=c(5,6,7)) )
( data2 = list(a=c(10,11), b=c(30,40), c=c(70,80)) )
cc - NULL
for(data in ls(pattern=^data[0-9]+$)) {
cc - c(cc, with(get(data), c))
}
mean(cc)
JeeBee.
On Fri, 30 Jun 2006 09:50:51 -0500, Taka Matzmoto wrote:
Dear R-user
Try this:
help.search(interpolate)
Then find this:
library(zoo)
na.approx(x)
[1] 1.0 4.0 5.0 8.0 6.0 4.0 4.5 5.0 5.0 1.0 2.0 7.0 8.0 9.0 10.5
[16] 12.0 13.5 15.0 6.0 8.0
Hth,
JeeBee.
On Thu, 22 Jun 2006 06:54:53 +0100, Sumanta Basak wrote:
Hi All,
I need your help
,
JeeBee.
require(tcltk) || stop(Package tcltk is not available.)
# Add path to BWidgets
addTclPath(.)
version.BWidget - tclvalue(tclRequire(BWidget))
start.gui - function() {
# Toplevel
tt - tktoplevel()
tkwm.title(tt, MyTitle)
# Notebook
### -- The following line makes R hang with 100
Hi List,
Is it possible to tell R to use tcl/tk 8.5?
My R package seems to depend on libtcl8.4.so.
However, in Windows it seems to be possible to set
TCL_LIBRARY and MY_TCLTK.
Is there something similar possible in Linux?
I have installed:
$ rpm -q R
R-2.3.1-1.fc5
$ locate libtcl8
in case length(x) is not a multiple of length(arr).
(or the other way around if arr was longer than x)
I made a nice one for you:
g - function(x) rowSums( t(t(1/x)) %*% arr )
It is likely someone else can do it much nicer (shorter),
my R knowledge still has to be increased ...
JeeBee.
On Thu, 15 Jun
Slightly better:
h - function(x) rowSums( as.matrix(1/x) %*% arr )
On Thu, 15 Jun 2006 19:41:12 +0200, JeeBee wrote:
Hi Alessandro,
The problem is that arr/x isn't quite doing what you
thought it was.
arr / x is something like
c(arr[1] / x[1], arr[2] / x[2], arr[1] / x[3
)
works, but it does not match J. TEST.
It does match J. Test correctly.
I have the feeling I'm not reading the documentation
good enough, but cannot seem to figure this out, sorry.
Thanks in advance,
JeeBee.
__
R-help@stat.math.ethz.ch mailing list
Found the problem already.
Without the 'with' it works, so I know where to look for the problem now.
Thanks anyways,
JeeBee.
On Mon, 05 Jun 2006 15:16:34 +0200, JeeBee wrote:
Can anybody fix the following, to match a string
disregarding case?
I tried:
with(my.data.frame, regexpr(pattern
,]
xlim = c(0,100), #ylim = c(0.2,0.5),
ylab = System welfare,
pch = 7, col = c(red,blue), type = b,
uiw = cbind(uiw1,uiw2))
Thanks in advance,
JeeBee.
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman
$yday+7)/7))
JeeBee
On Mon, 12 Dec 2005 12:59:11 +0100, Richard van Wingerden wrote:
Hi,
Given a frame with calendar date's:
2005-07-01, 2005-07-02,2005-07-03,2005-07-04,2005-07-05,etc.
I want to extract the following from these dates:
week number
month number
year number
Any
if someone will show you an example ;)
JeeBee.
On Tue, 13 Dec 2005 08:32:15 -0500, Gabor Grothendieck wrote:
Does anyone have an idea of how to make a chart in R like the
ones here that use a graphic:
http://bigpicture.typepad.com/comments/images/slide1.gif
')
JeeBee.
On Tue, 13 Dec 2005 11:31:33 -0300, Carlos Mauricio Cardeal Mendes wrote:
Please, I´d like to store this sample matrix as a new object. How can I
do this ?
pulse - c(67, 67, 68, 68, 68, 69, 69, 69, 69, 69, 70, 70, 70, 70, 71,
71, 72, 72, 73, 74)
m - NULL
x - 0
for (i in 1:5)
{
x
Here is one possible solution:
for(cr in seq(1, dim(combin_mat)[2])) {
W = which(input_mat[,combin_mat[1,cr]] == 1
input_mat[,combin_mat[2,cr]] == 1)
cat(Combination, cr, (, combin_mat[,cr], ) :, W, \n)
}
JeeBee.
---
Full program:
N = 4
input_numbers = seq((2^N)-1, 0, -1
You could install.packages(e1071)
and see help(hamming.distance)
JeeBee.
hamming.distancepackage:e1071R Documentation
Hamming Distances of Vectors
Description:
If both 'x' and 'y' are vectors, 'hamming.distance' returns the
Hamming distance (number of different
I've found several similar issues with write.table/read.table
with Dates on this list, but trying to follow this advice I still
get an error.
First, I read in data from several files, constructing several date/time
columns using ISOdatetime
str(Tall$Begin)
'POSIXct', format: chr [1:40114]
I see that strptime returns a list of
year, mon, mday, hour, min, sec, etc.
The following works for me (for each column that is a date/time field
in my imported file)
cat(Converting date/time fields...\n)
Q = strptime(as.character(data$myfield), format=%Y-%m-%d%H:%M:%S)
data$myfield =
37 matches
Mail list logo