similar to: Error message: Bad value

Displaying 20 results from an estimated 1000 matches similar to: "Error message: Bad value"

2006 Dec 20
1
Reformat meteorological data
Dear HelpeRs: I have a data set in the following format, which will be familiar to those of you working with NCDC climate data. Example: Year <- rep(1:3, each = 3) Year <- c(Year,Year) ID <- rep(1:2, each = 9) Jan <- runif(18, min = 0, max = 20) Feb <- runif(18, min = 0, max = 20) Mar <- runif(18, min = 0, max = 20) var <- gl(3,1,18,label =
2007 Mar 23
4
Conversion from string to date type
Hi, I'm on my very first steps to R and so I hope that I do not ask a really stupid questions but I did not found it via R-Search, in the FAQ or Google (BTW, the name "R" is not a really good seekiong criterion ;-) ). I have a data file containing a table that containes dates and values like date\t value1\t value2, ... 01.03.2007\t 17\t 42\t ... 02.03.2007\t 2\t 3\t ...
2003 Dec 02
1
Is there a way to use CGIwithR in Windows?
Dear R-Help, Does anyone know of a way to use CGIwithR in Windows? David Firth the author of CGIwithR states "It ought to be possible to adapt it for use also in conjunction with web servers running under Windows NT ... but the author has no plans for that." I have developed some applications in R that I would like to make available through a web interface using CGIwithR but at this
2012 Jun 20
2
reshape
Hello, helpeRs, I am attempting to reshape (either base R or package reshape) multiple .csv spreadsheets from a very unfortunate wide format to long format. ?Each spreadsheet looks something like this, after being read in to R: toy <- data.frame(year = rep(2007:2008,each = 20), month = rep(1:5,each = 4, length = 40), day = rep(1:2,each = 2,length = 40), hhmm = rep(1100:1101,length = 40),
2016 Apr 28
2
paths for install and libraries?
I've written a fairly elaborate package (called "eoa") that relies on functions from several other packages. I've built the package into a zip file on Windows using Hadley's devtools::build(binary = T) and have sent the zip to a couple dozen people for testing. My package installs fine, but some people are having trouble loading it. After library(eoa), they get something
2016 Apr 28
2
paths for install and libraries?
I've written a fairly elaborate package (called "eoa") that relies on functions from several other packages. I've built the package into a zip file on Windows using Hadley's devtools::build(binary = T) and have sent the zip to a couple dozen people for testing. My package installs fine, but some people are having trouble loading it. After library(eoa), they get something
2016 Apr 29
2
tcltk: click and return table cell index
I'm struggling mightily with what should be a simple task...when a user clicks on a cell in a tcltk table widget, I need to know which cell was clicked. One idea that gives a cryptic error: tkbind(table1, "<Button-1>", function(x, y){ tcl(table1, "index", x, y) } # x, y give pixel coordinates; "index" should give cell coordinates, but format must be
2013 Mar 07
2
iterative extracting data from a list without keys
Dear R Users. This seems like a simple task, but I'm stuck. I have a list with 3 elements: (2 vectors and 1 matrix). I wish to extract each of these data elements using index subscripts and multiply them with a vector multiplier. What I have: > betas [1] 0.01 0.01 0.01 > LData[1] $int [1] 1 1 1 1 1 1 1 1 1 1 $date [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]
2010 Aug 18
1
syntax for batching rbind process
Dear helpeRs, I am attempting to read in a series of csv files so I can bind them into one large dataframe. I have written the following script: test <- list.files(".", pattern = "csv") #lline 1 imp <- list() #line 2 for (i in 1:length(test)) { #line 3 imp[i] <- read.csv(test[i]) #line 4 }
2012 Nov 01
2
Name assignment in for loop
Dear helpeRs- I'm using a for loop to create a series of models. I'm trying to assign a name to each model created, using the loop index. The loop gets stuck at the name of the model, giving the error "target of assignment expands to non-language object". The linear model runs without error; only the name is problematic. Here is the current loop syntax. The use of dat
2010 Aug 12
4
conditional selection of dataframe rows
Dear helpeRs, I have a dataframe (14947 x 27) containing measurements collected every 5 seconds at several different sampling locations. If one measurement at a given location is less than zero on a given day, I would like to delete all measurements from that location on that day. Here is a toy example: toy <- data.frame(CH = rep(3:5,3), DAY = c(rep(4,5), rep(5,4)), SLOPE =
2013 May 17
3
Command line not responding
Running 9.0-Stable on an i386. Whenever I type a command at the prompt I get the output /usr/local/lib/libintl.so.9: Undefined symbol "_ThreadRuneLocale" and nothing else - the command will not run. Just the above output. Commands like "ls" and "exit" work, but not much else. This happends whether I am logged in a user or as root. Cannot even halt the system from
2010 Aug 27
3
interpreting date-related error message
Hello, helpeRs, I have a vector of numbers from 1-365 (days of the year) that I would like to convert to a date. There are no NA's and no missing values. I did not insert leading zero's for numbers less than 100. Using the syntax: dat$doy.1 <- as.numeric(format(dat$doy, "%j" )) I get the following error message: Error in prettyNum(.Internal(format(x, trim, digits,
1998 Jun 26
2
R-beta: Problem with functions using sub and gsub
Previously I had problems with data(foo) and Gass and I had problems with help(). His diagnostic was "POSIX regular expressions not available" and mine was "invalid regular expression". Martin Maechler has no problems with Solaris 2.5 and suggested a regular expression library was needed, e.g., regex-x.xx. Solaris 2.4 has regex.o in /usr/ccs/libgen.a and regex.h in
2004 Feb 05
1
What is the correct way of using function C() for factors:
The funciton c() works differently for strings and for factors: For strings: > l = c('a', 'b') > l [1] "a" "b" For factors: > l = c(factor('a'), factor('b')) > l [1] 1 1 What should be the right technique for merging factors? -- Svetlana Eden Biostatistician II School of Medicine
2006 May 17
4
uniform and clumped point plots
I am trying to generate two dimensional random coordinates. For randomly distributed data I have simply used >xy<-cbind(runif(100),runif(100)) However I also want to generate coordinates that are more uniformly distributed, and coordinates that are more contagiously distributed than the above. Can anyone make any suggestions Thanks. Dr Terry Beutel Rangeland Scientist Animal
2003 Nov 14
6
index of max value ?
Is there a function in R, which would return index of maximum value in a vector ? e.g. > v <- round(10*rnorm(8)) > v [1] 6 -3 -6 15 7 9 0 -19 > max(v) [1] 15 ??? index.max(v) ??? 4
2010 Sep 28
2
Reshape
Hello, helpeRs, I've been trying, unsuccessfully, to change a dataframe from long to wide format using reshape (the original). I would appreciate it if someone could demonstrate the correct syntax. The script below will create a toy example. The new wide data should have a column name for each unique entry in the "fame" column. Under each column should be either the
2010 Mar 04
1
extracting values conditonal on other values
Dear R helpers, I have a dataframe (test1) containing the time of sunrise and sunset for each day of the year for 3 years. I have another dataframe (test2) containing measurements that are taken every 15 minutes, 24/7. I would like to extract all rows from test2 that occur between sunrise and sunset for the appropriate date. Can you suggest a good vectorized way to do this? Keep in mind
2004 Jul 20
3
regression slope
Hello, I'm a newcomer to R so please forgive me if this is a silly question. It's that I have a linear regression: fm <- lm (x ~ y) and I want to test whether the slope of the regression is significantly less than 1. How can I do this in R? I'm also interested in comparing the slopes of two regressions: fm1 <- lm (x ~ y) fm2 <- lm (a ~ b) and asking if the slope of fm1 is