similar to: data.frame to matrix

Displaying 20 results from an estimated 1000 matches similar to: "data.frame to matrix"

2001 Feb 22
2
Problem with tcltk listbox
Hi! I've got two problems with listboxes and selection: I created a listbox, no problem. Then I bind the Button-1 of the mouse to the listbox to start some things by pressing the mousebutton. The proiblem is that as I click a item of the listbox this error occured: Error in .Tcl(.Tcl.args(...)) : [tcl] bad listbox index "": must be active, anchor, end, @x,y, or a number. Repaeting
2013 Aug 03
1
tk + browser() can leave R unresponsive
I don't know if this is a bug. I can reproduce the following on Ubuntu 12.04.2 and 13.04 64-bit with R version 3.0.1 and with r63479. There is no difference if R is patched with the fix for PR#15407 or not, although without the fix there are more ways to trigger this. I can reproduce with the following: 1. Open R in gnome-terminal or xterm 2. Run 'library(tcltk)' 3. Run
2008 Jul 22
1
tklistbox and extracting selection to R
Dear experts, I am trying to understand why is it that when I paste (into the R console) the following code to select an option from a list: require(tcltk) tt<-tktoplevel() tl<-tklistbox(tt,height=ntx,selectmode="single",background="white") tkgrid(tklabel(tt,text="Select the legend of" )) tkgrid(tl) treatments<<-levels.tx for(i in
2008 Nov 23
1
tklistbox - R-Objekt
Hello, I have a problem with a tklistbox. The user should be able to choose one out of two calculation methods needed for further calculations. My r-script for that purpose looks like that: require(tcltk) tt<-tktoplevel() tl<-tklistbox(tt,height=4,selectmode="single",background="white") tkgrid(tklabel(tt,text="select method for LAI
2013 Jan 22
1
FactoMineR
Dear Users, I installed R Commander and the FactoMineR plug-in. Everything is fine, I can see the new menu, I can import datasets, but if I want to use any of the items in the FactoMineR menu, i get the following error: Error in get(.activeDataSet) : object '.activeDataSet' not found even if there is an active dataset (if there is none, all the menu items are grey of course). I have R
2004 Jan 09
2
strange behaviour when converting from char to POSIX (PR#6422)
Full_Name: Christoph Schmutz, MeteoSchweiz, Switzerland Version: R1.7.1, R1.8.1 OS: windows2000, solaris sunOS 5.8 Submission from: (NULL) (141.249.133.6) I'm not sure if I don't get the clue, but please consider this: > strptime("19930870150","%Y%j%H%M") [1] "1993-03-28 01:50:00" > strptime("19930870250","%Y%j%H%M") [1]
2004 Mar 30
2
Sweave and graphic output locations
Hello, I'm using R1.8.1 on windows 2000 and version 1.8.1 of the tools package. I am attempting to have Sweave write files to a different directory via: testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "tools") ## create a LaTeX file Sweave( testfile, output = "C:/temp/Sweave-test-1.tex",
2004 May 11
2
- making a Windows library from Unix source code
Hi All, I'm using R1.8.1 on Windows XP. I'm having trouble producing an R library from source code. A colleague has written the source code, in Unix. I've copied the source code across to Windows (with the help files, data files, description and index) and am trying to compile it into a library. I've "sourced" each of the *.r files and they appear to work.
2004 May 20
2
ifelse when test is shorter than yes/no
Hi, It turns out that the 'test' vector in ifelse(test, yes, no) is not recycled if it is shorter than the other arguments, e.g. > ifelse(TRUE, seq(10), -seq(10)) [1] 1 Is there any particular reason it is not recycled? If there is one indeed a warning message might be in order when someone calls ifelse with a shorter 'test'. This is R1.8.1 on RH-7.3 Thanks, Vadim
2004 Aug 05
1
R interface to Python (in Windows)
I put a copy of R 1.8.1 for Windows on our FTP site at: ftp://ftp.odot.state.or.us/outgoing/Test/. It should be there for a few days before it gets deleted. Benjamin Stabler Transportation Planning Analysis Unit Oregon Department of Transportation 555 13th Street NE, Suite 2 Salem, OR 97301 Ph: 503-986-4104 -----Original Message----- From: Peter Wilkinson [mailto:pwilkinson at videotron.ca]
2004 Mar 11
3
making operators act on rows of a data frame
Dear R helpers, I wish to use the "sum" operator for each row of a data frame. However, it appears that the operator acts on the entire data frame, over all columns. What is the best way to obtain row- wise operation? The following code shows my attempts so far, and their problems:- test1=array(rbinom(120,1,0.5),c(20,3)) test1[,3]=NA sum(test1[,1:2]) test1[,3][sum(test1[,1:2])>=2]=1
2004 May 25
4
Object "silhouette.default" not found. But I knew that it is there.
Hi! >library(cluster) In this lib a function called silhoutte.default is defined than on the R prompt it type >silhouette.default Error: Object "silhouette.default" not found R1.9.0 The same error are at R1.8.1 And I knew that a function silhoutte.default are present. But the same piece of code works in R1.6.2 ??? Eryk Dipl. bio-chem. Eryk Witold Wolski @
2004 Apr 07
1
installing RMySQL
Hi, I have problems installing RMySQL under R1.8.1 and RHlinux (kernel2.4.7). During compilation I get: ** libs gcc -I/usr/lib/R/include -I/usr/include/mysql -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -m486 -fno-strength-reduce -g -c RS-DBI.c -o RS-DBI.o gcc -I/usr/lib/R/include -I/usr/include/mysql -I/usr/local/include -D__NO_MATH_INLINES -mieee-fp -fPIC -O2 -m486
2004 Jun 03
1
catching the warnings
Hello, I'd like to catch the warnings in a variable in order to evaluate them, but... > tt<-warnings() Warning messages: 1: XML Parsing Error: test.xml:2: xmlParseStartTag: invalid element name 2: XML Parsing Error: test.xml:3: Extra content at the end of the document > tt NULL is there a way to achieve this (R1.8.1)? thanks, Marc
2004 Feb 04
5
nortest package
Hi, I'm a newbie and i am unable to use lillie.test in nortest I have a message: "Couldn't find function "lillie.test" I am under windows2000 with R1.8.1 nortest is listed with .packages(TRUE) How to do to use lillie.test function? Laurent Houdusse Analyste Programmeur
2004 Apr 04
1
Sporadic error in kalmanSmooth (PR#6738)
On Sat, 03 Apr 2004 21:34:25 -0400, you wrote: >Defining the following: > > set.seed(123) > > kalmanTorture <- function(iter) { > x <- arima.sim(model = list(ar=0.9, ma=0.5),n=150 ) > x[10:20] <- NA > mod <- arima(x, order=c(1,0,1) ) > for (i in 1:iter) { > smooth <- KalmanSmooth(x, mod=mod$model)$smooth > if (any(is.na(smooth)))
2004 Jan 29
1
setMethodReplace.. Help!
Hi! Trying to reproduce some examples from "Programming with Data" page 341. Can not reproduce it neither on R1.8.1. nor R1.9.0devel? library(methods) setClass("track",representation(x="numeric",y="numeric")) setMethod("[" ,"track" ,function(x,...,drop=T){ track(x at x[...],y at y[...]) }
2004 Feb 13
1
Problems loading dataset in Rcmdr
Hello all! I?ve been using Rcmdr for some time, as a quick way of producing graphics and basic statistics. I run R1.8.1, OS W2000. Two days ago the dataset loader stopped working. Normally, the button <No active dataset> is clickable to give you the opportunity to choose dataset to load in the Rcmdr context. Clicking on the button now produces this: Rcmdr Version 0.9-3 Error in parse(file,
2004 Mar 30
1
unexpected behavior in plot
I'm having difficulty getting plot to work with type="n", when either the x or y variables is a factor. For example, x <- 1:10 y <- 1:10 plot(x, as.factor(y), type="n") plot(as.factor(x),y, type="n") plot(y ~ as.factor(x), type="n") produce plots with data plotted, whereas plot(x,y, type="n") plot(y ~ x, type = "n")
2004 Oct 04
2
call step inside a function
I am wondering why my function works fine in R1.7.1 and R1.8.1 but not in R1.9.0. I thought it's an environment related problem but I can't solve it. >data weta jd 1 1 4 2 2 13 3 2 13 4 6 4 5 1 3 6 1 7 7 2 10 8 3 10 9 1 8 10 1 8 11 3 6 12 1 9 13 1 5 14 1 1 15 3 13 16 1 2 17 2 2 18 7 11 19 1 3 20 5 4