similar to: rpart question

Displaying 20 results from an estimated 4000 matches similar to: "rpart question"

2002 May 01
1
converting #sec to POSIX* format
Sure I'm missing something simple here, but I haven't been able to find a easy way to convert a pure numeric (# of seconds since the beginning of 1970) back into a POSIX* object. ex. > z<-as.POSIXct(Sys.time()) > z [1] "2002-05-01 10:33:56 Mountain Daylight Time" > x<-unclass(z) > x [1] 1020270836 Is there a simple way to transform x back into a POSIX*
2003 May 09
3
Windows 2000 Profiles Through Freeswan VPN
Hello, I have setup a samba server at my office as a PDC it stores the profiles on the server fine. I can access the profiles from any computer in the office just fine. My problem is that I work from home 4 days a week and need to access my work profile. I currently VPN into the office network via freeswan. I can log into the the domain from the vpn'd connection and I can access the samba
2008 Apr 28
1
error in summary.Design
Dear list, after fitting an lrm with the Design package (stored as "mymodel") I try running a summary, but I get the following error: dim(mydata) [1] 235 9 names(mydata) [1] "id" "VAR1" "VAR2" "VAR3" "VAR4" "VAR5" "VAR6" "VAR7" "VAR8" summary(mymodel) Error in `contrasts<-`(`*tmp*`,
2003 Jan 03
1
Take care with codes()! (was type of representation)
Ahh yes, sorry about that. Here's the corrected snippet: # Create an Example Data Frame Containing Car x Color data carnames <- c("bmw","renault","mercedes","seat") carcolors <- c("red","white","silver","green") datavals <- round(rnorm(16, mean=10, sd=4),1) data <- data.frame(Car=rep(carnames,4),
2009 Sep 01
3
Simple question about error on CSV import
I have a substantial CSV to import but can't seem to import even the simplest CSV. I'm running the latest stable REvolution R on OS X if that is pertinent. Here's the contents of a simple test2.csv CSV file: #,Status,Project 5842,New,Test > snortalerts = read.table( "/Users/lcox/Documents/test2.csv", header=TRUE, > sep=",", row.names="#") Error
2005 Jan 27
1
Is glm weird or am I?
Hi, I've written a script that checks all bivariate correlations for variables in a matrix. I'm now trying to run a logistic regression on each pair (x,y) where y is a factor with 2 levels. I don't know how (or whether I want) to try to fathom what's up with glm. What I wrote is attached. Here's what I get. *****************************************************
2009 Sep 15
2
best method to format output of frequency table
I have some security alert log data that I'm parsing and doing some stats on. One of the fields is the "Classtype" which is the enumerated value of the type of alert found. classtypes = factor( alerts$Classtype ) fclass_types = table( classtypes ) fclass_types gives me a frequency table of the intrusion types: fclass_types classtypes
2007 Aug 06
3
Error in using nlevels in apply function
Dear R users, I am currently trying to create my first personnal function and use it with the apply function. The purpose of this function is to create a vector summarizing the number of levels in a given selection of data.frame columns. I tried to transpose the indexation method used by the nlevels function but it doesn't seem to work. I did not find anything uesful in the archives so
2011 Dec 22
1
overlaid filled contour plots
I'm trying to make a set of contour plots of bivariate kernel density estimates, showing three such plots overlaid, similar to this plot http://euclid.psych.yorku.ca/SCS/Private/Test/ridge-boot2.pdf except that I would like to have the contours *filled* (using transparent colors). To make this reproducible, I've saved the results of KernSmooth::bkde2D() in the following file:
2009 Sep 17
3
Simple as.Date question dealing with a timezone offset
I've been trying to understand the as.Date functionality and I have a date and time stamp field that looks like this: "Tue Sep 15 09:22:09 -0600 2009" and I need to turn it into an R Date object for analysis. Simple date conversions I have down, no problem: > adate = c("7/30/1959") > as.Date(adate,"%m/%d/%Y") [1] "1959-07-30" > But when it
2004 Sep 20
2
problem with R CMD build (PR#7240)
Hello, This may not be a bug--but I'm not sure. I have R 1.91 installed on a machine that's running Windows XP. In Cygwin, when I attempt to use the "build" command it tells me that TMPDIR is set to an invalid directory. See the results below: stat20:/cygdrive/d/dirk/bands/implementation -> which r /cygdrive/d/Programs/R/rw1091/bin/r
2011 Mar 19
2
persuade tabulate function to count NAs in a data frame
Hi, I'd like to ask you a question again. It is basically about data frames, NAs and tabulate function. I have this data frame. I already used this in one of the previous questions of mine. It intentionally looks this simple, my real 'df' dataframe is much bigger actually and again, I am not willing to annoy anyone with huge databases... So, my database: id
2001 Oct 10
1
Wrong df in bartlett.test when subsetting data (PR#1124)
Full_Name: Jens Lund Version: 1.3.1 OS: Windows Submission from: (NULL) (194.239.194.210) When we subset a dataset bartlett.test does not calculate the df correctly: X <- rnorm(50) # Generate simulated samples f <- gl(10,5) # Generate a factor with 10 levels and # 5 replications of each level # Works correctly bartlett.test(X,f) # Correct number of df = 9 #
2005 Nov 23
1
assign() problem
I've written a piece of code (see below) to do a wavelet image decomposition, during the evaluation of this code I would like to write the results of some calculations back to the R root directory. I used assign() to do so because the names should vary when going thrue a while() loop. For some unknown reason I get an error that says: Error in assign(varname[i], imwrImage) :
2007 Jul 30
1
correlation and matrix
Dear everyone, I am new in R and I've got difficulties in realizing the following tasks: -I have variables (factors) with different numbers of levels, either 1, 2 or 3. -I have a matrix containing these 204 factors and I have to correlate them by groups of 4 variables. -I have to delete the factors just having one level ( because when correlating one-level factors, the output is NA) here
2012 Feb 09
2
Lattice 3d coordinate transformation
Hello List! I asked this before (with no solution), but maybe this time... I'm trying to project a surface to the XY under a 3d cloud using lattice. I can project contour lines following the code for fig 13.7 in Deepayan Sarkar's "Lattice, Multivariate Data Visualization with R", but it fails when I try to "color them in" using panel.levelplot. ?utilities.3d says there
2013 Jan 16
1
setting the legend scale in contour plots
Hi, I'd like to compare SST data for year 2000 with SST for year 2001. I managed to get filled contour plots showing monthly SST for both years (12 plots for each year, 24 plots in total). In order to compare year 2000 and year 2001, however, I'd need to have the same legend scale (same color bar) in both years plots. Thus, my question is: is there a way to set the legend scale in
2009 Dec 10
2
different randomForest performance for same data
Hello, I came across a problem when building a randomForest model. Maybe someone can help me. I have a training- and a testdataset with a discrete response and ten predictors (numeric and factor variables). The two datasets are similar in terms of number of predictor, name of variables and datatype of variables (factor, numeric) except that only one predictor has got 20 levels in the training
2007 Aug 01
1
Problem to remove loops in a routine
Dear R-users, I have written the following code to generate some trellis plots. It works perfectly fine except that it is quite slow when it is apply to my typical datasets (over several thousands of lines). I believe the problem comes from the loops I am using to subset my data.frame. I read in the archives that the tapply function is often more efficient than a loop in R. Unfortunately ,
2008 Jul 22
2
rpart$where and predict.rpart
Hello there. I have fitted a rpart model. > rpartModel <- rpart(y~., data=data.frame(y=y,x=x),method="class", ....) and can use rpart$where to find out the terminal nodes that each observations belongs. Now, I have a set of new data and used predict.rpart which seems to give only the predicted value with no information similar to rpart$where. May I know how