similar to: Problems creating packages.

Displaying 20 results from an estimated 800 matches similar to: "Problems creating packages."

2009 May 31
1
Error:non-numeric argument in my function
Hello! I have a function: zywnoscCalosc<- function( jedzenie, n1, n2, n3, n4, d1, d2, d3, d4 ) { ndf <- data.frame(nn1=n1,nn2=n2,nn3=n3,nn4=n4) ddf <- data.frame(dd1=d1,dd2=d2,dd3=d3,dd4=d4) for (i in 1:length(n1)){ wekt_n = ndf[i,] wekt_n_ok = wekt_n[!is.na(wekt_n)] dl_n = length(wekt_n_ok) wynik = (1*wekt_n_ok)/(1*dl_n) } } and I get an error like this: Error in 1 * wekt_n_ok :
2009 Jun 02
2
What do you think about my function?
Hello, I want to know what do you think about my function. I know that it isn't briliant :/ but what do you think? What I should do that my function will be better? (now is very slow and not ideal, sometimes I also get a mistake!) ########## My function ############################################# dzieci<-transform(dzieci, zywnosc=0) zywnoscCalosc<- function( jedzenie, sklep, n1, n2,
2009 Feb 18
1
Training nnet in two ways, trying to understand the performance difference - with (i hope!) commented, minimal, self-contained, reproducible code
Dear all, Objective: I am trying to learn about neural networks. I want to see if i can train an artificial neural network model to discriminate between spam and nonspam emails. Problem: I created my own model (example 1 below) and got an error of about 7.7%. I created the same model using the Rattle package (example 2 below, based on rattles log script) and got a much better error of about
2006 Sep 11
2
Translating R code + library into Fortran?
Hi all, I'm running a monte carlo test of a neural network tool I've developed, and it looks like it's going to take a very long time if I run it in R so I'm interested in translating my code (included below) into something faster like Fortran (which I'll have to learn from scratch). However, as you'll see my code loads the nnet library and uses it quite a bit, and I
2008 Jun 12
1
About Mcneil Hanley test for a portion of AUC!
Dear all I am trying to compare the performances of several methods using the AUC0.1 and not the whole AUC. (meaning I wanted to compare to AUC's whose x axis only goes to 0.1 not 1) I came to know about the Mcneil Hanley test from Bernardo Rangel Tura and I referred to the original paper for the calculation of "r" which is an argument of the function cROC. I can only find the
2003 Jul 16
1
Help on NNET
Hi, Dear all, I am just starting using R in my work and got some trouble to figure out some of the errors. Can anybody help me? The following is the script: read.csv('pupil.txt',header=TRUE,sep='\t')->pupil samp<-c(1:50, 112:162, 171:220, 228:278) pupil.nn2 <- nnet(Type ~ ., data = pupil, subset = samp, size = 2, rang = 0.1, decay = 5e-4, maxit = 200)
2006 Mar 15
1
How to compare areas under ROC curves calculated with ROCR package
Dear all, I try to compare the performances of several parameters to diagnose lameness in dogs. I have several ROC curves from the same dataset. I plotted the ROC curves and calculated AUC with the ROCR package. I would like to compare the AUC. I used the following program I found on R-help archives : From: Bernardo Rangel Tura Date: Thu 16 Dec 2004 - 07:30:37 EST
2006 Mar 20
1
How to compare areas under ROC curves calculated with ROC R package
I might be missing something but I thought that AUC was a measure for comparing ROC curves, so there is nothing else needed to "compare" them. The larger AUC is the higher correlation of 2 variables compared. No other measures or calculations are needed. Jarek Tuszynski -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On
2005 Jul 27
1
how to get actual value from predict in nnet?
Dear All, After followed the help of nnet, I could get the networks trained and, excitedly, get the prediction for other samples. It is a two classes data set, I used "N" and "P" to label the two. My question is, how do I get the predicted numerical value for each sample? Not just give me the label(either "N" or "P")? Thanks! FYI: The nnet example I
2009 Oct 28
1
need help explain the routine input parameters for seROC and cROC found in the R archive
Please help. I found the code in the archive. The author of this script says: "The first function (seROC) calculate the standard error of ROC curve, the second function (cROC) compare ROC curves." Can some one explain to me what are the na, nn and r parameters which are used as the input to the following two functions? Thanks much in advance. > From: Bernardo Rangel Tura >
2012 Jul 24
3
Nearest Neighbors
I was wondering if there is a way in R to find k nearest neighbors of various orders, say order 2, 3, or 4. In otherwords neighbors of neighbors of neighbors. You get the idea. I know that I can use knearneigh(matrix.data, k) but this only gives me the k nearest neighbors and not of a particular order. Thanks in advance. -- View this message in context:
2011 Jan 05
0
Nnet and AIC: selection of a parsimonious parameterisation
Hi All, I am trying to use a neural network for my work, but I am not sure about my approach to select a parsimonious model. In R with nnet, the IAC has not been defined for a feed-forward neural network with a single hidden layer. Is this because it does not make sens mathematically in this case? For example, is this pseudo code sensible? Thanks in advance for your help. I am sorry if this
2010 Aug 16
0
Help for using nnet in R for NN training and testing
Hello, I want to use nnet package in R, to train and simulate a NN and get the value of MSE. I am reading in a file which has 19 input variables and one output variable and has a total of 2000 observations. The first column in the file is a column just for giving the serial numbers of the observations. I have already read in the file and also extracted the different values into the matrices to
2006 Aug 16
0
Regular expressions: retrieving matches depending on intervening strings [Follow-up]
Dear all This is a follow-up to an earlier posting today regarding a regular expression question. In the meantime, this is the best approximation I could come up with and should give you a better idea what I am talking about. a<-c("<w AT0>a <w NN1>blockage <w CJC>and <w DT0>that<c PUN>.", "<w AT0>a <w NN1>blockage <w CJC>and
2009 May 12
0
FW: neural network not using all observations
As a follow-up to my email below: The input data frame to nnet() has dimensions: > dim(coreaff.trn.nn) [1] 5088 8 And the predictions from the neural network (35 records are dropped - see email below for more details) has dimensions: > pred <- predict(coreaff.nn1) > dim(pred) [1] 5053 1 So, the following line of R code does not work as the dimensions are
2009 May 12
0
How do I extract the scoring equations for neural networks and support vector machines?
Sorry for these multiple postings. I solved the problem using na.omit() to drop records with missing values for the time being. I will worry about imputation, etc. later. I calculated the sum of squared errors for 3 models, linear regression, neural networks, and support vector machines. This is the first run. Without doing any parameter tuning on the SVM or playing around with the number of
2009 May 12
0
neural network not using all observations
I am exploring neural networks (adding non-linearities) to see if I can get more predictive power than a linear regression model I built. I am using the function nnet and following the example of Venables and Ripley, in Modern Applied Statistics with S, on pages 246 to 249. I have standardized variables (z-scores) such as assets, age and tenure. I have other variables that are binary (0 or 1). In
2011 Jun 14
1
heatmap with values
Hi! I'm displaying a contingency table with heatmap(): > svm.predPix.tabla svm.predPix CC DD LL NN NN2 CC 22 0 3 8 3 DD 0 27 0 1 0 LL 1 1 90 3 7 NN 2 0 1 11 4 NN2 0 0 5 1 20 > heatmap(svm.predPix.tabla[5:1,], Rowv=NA, Colv=NA,col = rev(heat.colors(32)), scale="column", margins=c(5,10)) and I'm happy
2007 Apr 19
0
minor omissions re "special" windows file names (PR#9622)
"lpt1" through "lpt9" and "com1" through "com9" are in fact "special" file names under various versions of Microsoft Windows. However, "R Extensions" says only that "lpt1" through "lpt4" and "com1" through "com3" cannot be used as filenames, and "R CMD check" checks for just these
2011 Mar 17
3
Beginner question: How to replace part of a filename in read.csv?
I would like to use samp as a part of a filename that I can change. My source files are .csv files with date as the file name, and I would like to be able to type in the date (later perhaps automate this using list.files) and then read the csv and write the pdf automatically. I have tried different combinations with "" and () around samp, but I keep getting the error "object