similar to: error in NORM lib

Displaying 20 results from an estimated 800 matches similar to: "error in NORM lib"

2008 Nov 25
1
Efficient passing through big data.frame and modifying select
> -----Original Message----- > From: William Dunlap > Sent: Tuesday, November 25, 2008 9:16 AM > To: 'johannes_graumann at web.de' > Subject: Re: [R] Efficient passing through big data.frame and > modifying select fields > > > Johannes Graumann johannes_graumann at web.de > > Tue Nov 25 15:16:01 CET 2008 > > > > Hi all, > > > >
2008 Dec 23
1
quotation problem/dataframe names as function input argument.
Dear R friends: Can someone help me with the following problem? Many thanks in advance. # Problem Description: # I want to write functions which take a (character) vector of dataframe names as input argument. # For example, I want to extract the number of observations from a number of dataframes. # I tried the following: nobs.fun <- function (dframe.vec) { nobs.vec <-
2012 Mar 30
1
How to use access results of gregexpr in data frames
Hello, I'm trying to figure out how to find the index of the second occurrence of "/" in a string (which happens to represent a date) within a data frame column. I've used the following code successfully to find the first instance of "/". dframe <- data.frame(date=c("5/14/2011", "4/7/2011")) dframe$x1 <- regexpr("/", dframe[, 1])
2011 Jun 09
3
How to subset based on column name that is a number ?
Hi, I have a data frame with column names "1", "2", "3", ... and I'd like to extract a subset based on the values in the first column. None of the methods I tried worked (below). x <- subset(dframe, 1 = = "My Text") x <- subset(dframe, "1" = = "My Text") x <- subset(dframe, names(dframe)[1] = = "My Text") Q
2006 Feb 01
3
norm package prelim.norm
Hey eveyone! I hope someone can help wiht this question. I have a matirux of all zeros and ones and I would like to indentify all unique patterns in the rows andthe number of times the pattern occurs. I changed all zeros to NA tried to use prelim.norm to identify all patterns of missing data in the rows. I got the message Warning message: NAs introduced by coercion Any ideas of how
2005 Feb 24
1
problem (bug?) with prelim.norm (package norm)
dear list members, there seems to be a problem with the prelim.norm function (package norm) as number of items in the dataset increases. the output of prelim.norm() is a list with different summary statistics, one of them is the missingness indicator matrix "r". it lists all patterns of missing data and a count of how often each pattern occured in the dataset. as the number of items and
2010 Oct 13
4
Change global env variables from within a function
Hi, I've looked all over for a solution to this, but haven't had much look in specifying what I want to do with appropriate search terms. Thus I'm turning to R-help. In the process of trying to write a simple function to rename individual column names in a data frame, I ran into the following problem: When I rename the columns within my function, I can't seem to get it to
2006 Jan 20
3
Selecting data frame components by name - do you know a shorter way?
Hi! I suspect there must be an easy way to access components of a data frame by name, i.e. the input should look like "name1 name2 name3 ..." and the output be a data frame of those components with the corresponding names. I ´ve been trying for hours, but only found the long way to do it (which is not feasible, since I have lots of components to select):
2011 Jul 08
1
Referencing a vector of data labels in ggplot function
Hi, I really feel I've looked everywhere, although I know this can't be a hard problem. I'd like to be able to call the graph below as a function, but I can't get the function to recognize variables beyond 'dframe'. I've read through many papers on writing functions in R, but I can't get this to work. data <- data.frame('date' = as.Date(rep(c(15101,
1999 Oct 19
2
Summary bug?
Hi, It seems that there's a bug in summary, in the max. output... but max() alone works fine. > hw04.dframe$area ... [41] 1790 1380 1296 2745 798 2306 438649 1481 1559 2450 ... > summary(hw04.dframe) area Min. : 798 1st Qu.: 1349 Median : 1690 Mean : 6962 3rd Qu.: 2306 Max. :438600 ### should read 438649 or, to the point,
2010 Jun 16
1
Too many columns with prelim.norm
Hi everyone, I'm trying to use prelim.norm with a "big" matrix (36 columns by 10000 or so rows). I found that prelim.norm has a built-in limit of 30 columns, but I'd still really like to use it for my data. Does anyone know of a different way to do the same thing? Or, would it be easier to try to modify the source code? Thanks! Josh
2007 Apr 25
1
prelim.norm() function not working
R-experts: I am trying to reproduce some of Paul Allison's results in his little green book on missing data (Sage 2002). The dataset for which I am having problems, "usnews", can be found at: http://www.ats.ucla.edu/stat/books/md/default.htm. I am working on a Windows machine with R 2.5 installed, all packages up-to-date. The problem has to do with the prelim.norm() function of the
2006 Jun 09
3
sqlSave() and rownames=TRUE makes my Rgui crash
Hello, I created a table in MySQL with this command CREATE TABLE example (pk INT NOT NULL AUTO_INCREMENT,PRIMARY KEY(pk), id VARCHAR(30),col1 VARCHAR(30),col2 VARCHAR(30)) ### In R, I can connect to this table: library(DBI) library(RODBC) chan <- odbcConnect("MySQL51", uid="root", pwd="xxx") first <- sqlQuery(chan, "select * from example")
2000 Jun 25
1
renaming columns
I frequently get data sets with cryptically-named variables. The datasets are more useful to me with informative variable names. I know that I can rename variables using the following command: dimname(dataset[[2]][index.of.variable.to.be.renamed]<-new.variable.name If I want to do this inside a function (say something I call RenameCol) what is the best way to communicate the
2008 Sep 12
2
Finding a vector position using names rather than values
Dear R gurus, I have been struggling with this for a while and thought you might be able to give me some guidance. I have a data frame, on which I apply a row function. The result looks to me like a vector that retains the old row names. I then sort the vector and subsequently need to be able to identify the rank of certain values by searching for their row names. See this mock example: >
2012 Aug 24
1
help with a special variant of balloonplot
Hi, I am interested in implementing a special variant of balloonplot.  Let me explain with an example dataset from the reference manual : library(gplots) data(Titanic) dframe<-as.data.frame(Titanic) survived<-dframe[dframe$Survived=="Yes",] attach(survived) balloonplot(x=Class,y=list(Age,Sex),z=Freq,sort=TRUE,show.zeros=TRUE,cum.margins=FALSE,             main="BalloonPlot :
2010 Jul 09
2
select columns from vector of column names
Hi I want to extract columns from a data frame using a vector with the desired column names. This short example uses the select argument in the subset function to accomplish what I am trying to do. Is there a better solution? #names of desired columns colnames <- c("col1","col3") #my data data <-
2004 Aug 26
1
EM norm package (NA/NaN/Inf in foreign function call (arg 2))
Greetings! I am bootstrapping and I am using EM in the norm package to fill in missing data for a financial time series with each step of the loop. For the most part EM works fine for me, but the following error message is guaranteed before I hit the 200th scenario: Iterations of EM: 1...2...3........348...349...Error: NA/NaN/Inf in foreign function call (arg 2) The following code should
2011 Jul 22
2
averaging rows based on string¿?
Hi Folks, Ran into something I'd really like to do in R simply/elegantly, but my R - coding skills seem surpassed. This is the thing. Imagine the following data: labs<-c("abcdef","abcgg","tgthefdk","tgtijuel","tgtnjmoi","gbnt","dlift") dat<-c(0.5,0.25,1,2,16,0.250,4) dframe<-data.frame(labs,dat) I would like to
2007 Oct 13
1
geom_errorbar with ggplot2
Dear All, I am trying to build an error bar plot with ggplot2. However, even if the code seems to work, the plot is rather odd, with what seems to be a continuous line linking the different bars. I attach below the code I used, as well as the data. ================================================================ DFrame<-data.frame(x=1:10,y=0.5*(1:10),Upper=(1:10)+0.5, Lower=(1:10)-0.5) p