Displaying 20 results from an estimated 30000 matches similar to: "Error message"
2024 Mar 22
1
Error message
? Fri, 22 Mar 2024 14:02:09 -0500
Val <valkremk at gmail.com> ?????:
> X2.R
> load("X1.RData")
>
> I am getting this error message:
> Error in load("X1.RData", :
> bad restore file magic number (file may be corrupted) .. no data
> loaded.
This error happens very early when R tries to load the file, right
at the first few bytes. Is
2024 Mar 22
1
Error message
Yes, X1.RData is large(more than 40M rows) .
How do I get the first few bytes?
On Fri, Mar 22, 2024 at 2:20?PM Ivan Krylov <ikrylov at disroot.org> wrote:
>
> ? Fri, 22 Mar 2024 14:02:09 -0500
> Val <valkremk at gmail.com> ?????:
>
> > X2.R
> > load("X1.RData")
> >
> > I am getting this error message:
> > Error in
2024 Mar 22
1
Error message
? Fri, 22 Mar 2024 14:31:17 -0500
Val <valkremk at gmail.com> ?????:
> How do I get the first few bytes?
What does file.info('X1.RData') say?
Do you get any output if you run print(readBin('X1.RData', raw(), 128))?
If this is happening on a Linux or macOS machine, the operating system
command xxd -l 128 X1.RData will give the same output in a more
readable manner,
2024 Mar 22
1
Error message
Here is the first few bytes,
xxd -l 128 X1.RData
00000000: 8d5a 35f8 1ac5 cc14 a04e be5c 572f a3ad .Z5......N.\W/..
00000010: 6210 7024 9b58 93c7 34d0 acb7 7a82 3f99 b.p$.X..4...z.?.
00000020: 66ce 0ebb 2057 ec36 55b4 0ece a036 695a f... W.6U....6iZ
00000030: 258b 3493 b661 f620 f7fe ada7 158a 15f7 %.4..a. ........
00000040: e016 a548 6fcb 20c8 6fb4 493d adc9 ea4a ...Ho. .o.I=...J
00000050:
2005 Aug 15
2
How to get a list work in RData file
Dear R-Helper,
I want to know how I get a list work which I saved in RData file. For
example,
> test.xy <- function(x,y) {
+ xy <- x+y
+ xy
+ }
>
> xyadd <- test.xy(x=2, y=3)
> xyadd
[1] 5
> x1 <- c(2,43,60,8)
> y1 <- c(91,7,5,30)
>
> xyadd1 <- test.xy(x=x1, y=y1)
> xyadd1
[1] 93 50 65 38
> save(list = ls(all=TRUE), file =
2007 Jun 28
1
saving objects with embedded environments
Hello,
I have been running linear regressions on large data sets. As 'lm' saves
a great deal of extraneous (for me) data including the residuals,
fitted.values, model frame, etc., I generally set these to NULL within
the object before saving off the model to a file.
In the below example, however, I have found that depending on whether or
not I run 'lm' within another function or
2018 Feb 25
3
include
Thank you Jim,
I read the data as you suggested but I could not find K1 in col1.
rbind(preval,mydat) Col1 Col2 col3
1 <NA> <NA> <NA>
2 X1 <NA> <NA>
3 Y1 <NA> <NA>
4 K2 <NA> <NA>
5 W1 <NA> <NA>
6 Z1 K1 K2
7 Z2 <NA> <NA>
8 Z3 X1 <NA>
9 Z4 Y1 W1
On Sat, Feb 24, 2018 at 6:18 PM, Jim
2018 Feb 25
2
include
HI Jim and all,
I want to put one more condition. Include col2 and col3 if they are not
in col1.
Here is the data
mydat <- read.table(textConnection("Col1 Col2 col3
K2 X1 NA
Z1 K1 K2
Z2 NA NA
Z3 X1 NA
Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE)
The desired out put would be
Col1 Col2 col3
1 X1 0 0
2 K1 0 0
3 Y1 0 0
4 W1 0 0
6 K2 X1
2018 Feb 25
0
include
Hi Val,
My fault - I assumed that the NA would be first in the result produced
by "unique":
mydat <- read.table(textConnection("Col1 Col2 col3
Z1 K1 K2
Z2 NA NA
Z3 X1 NA
Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE)
val23<-unique(unlist(mydat[,c("Col2","col3")]))
napos<-which(is.na(val23))
preval<-data.frame(Col1=val23[-napos],
2018 Feb 25
2
include
Sorry , I hit the send key accidentally here is my complete message.
Thank you Jim and all, I got it.
I have one more question on the original question
What does this "[-1] " do?
preval<-data.frame(Col1=unique(unlist(mydat[,c("Col2","col3")]))[-1],
Col2=NA,col3=NA)
mydat <- read.table(textConnection("Col1 Col2 col3
Z1 K1 K2
Z2
2004 Jun 07
2
strange apparently data-dependent crash with large data (PR#6955)
I'm consistently seeing R crash with a particular large data set. What's
strange is that although the crash seems related to running out of memory,
I'm unable to construct a pseudo-random data set of the same size that also
causes the crash. Further adding to the strangeness is that the crash only
happens if the dataset goes through a save()/load() cycle -- without that,
the
2018 Feb 24
3
include
On 24/02/2018 1:53 PM, William Dunlap via R-help wrote:
> x1 = rbind(unique(preval),mydat)
> x2 <- x1[is.na(x1)] <- 0
> x2 # gives 0
>
> Why introduce the 'x2'? x1[...] <- 0 alters x1 in place and I think that
> altered x1 is what you want.
>
> You asked why x2 was zero. The value of the expression
> f(a) <- b
> and assignments
2018 Feb 25
0
include
Jim has been exceedingly patient (and may well continue to be so), but this smells like "failure to launch". At what point will you start showing your (failed) attempts at solving your own problems so we can help you work on your specific weaknesses and become self-sufficient?
--
Sent from my phone. Please excuse my brevity.
On February 25, 2018 7:55:55 AM PST, Val <valkremk at
2018 Feb 24
2
include
Thank you Jim
I wanted a final data frame after replacing the NA's to "0"
x1 = rbind(unique(preval),mydat)
x2 <- x1[is.na(x1)] <- 0
x2
but I got this,
[1] 0
why I am getting this?
On Sat, Feb 24, 2018 at 12:17 AM, Jim Lemon <drjimlemon at gmail.com> wrote:
> Hi Val,
> Try this:
>
>
2018 Feb 25
0
include
hi Val,
Your problem seems to be that the data are read in as a factor. The
simplest way I can think of to get around this is:
mydat <- read.table(textConnection("Col1 Col2 col3
Z1 K1 K2
Z2 NA NA
Z3 X1 NA
Z4 Y1 W1"),header = TRUE,stringsAsFactors=FALSE)
preval<-data.frame(Col1=unique(unlist(mydat[,c("Col2","col3")]))[-1],
Col2=NA,col3=NA)
rbind(preval,mydat)
2010 Jul 23
2
randomness using runif
I'm working on a problem where I'm introducing random error and have
been using the built in function runif to provide that random error.
However, I realized that I seem to be getting some unexpected behavior
out of the function and was hoping someone could share some insight.
I don't know the runif algorithm at all, but from the behavior I'm
seeing, it seems that whenever I open
2018 Feb 24
0
include
Thank you Jim and all, I got it.
I have one more question on the original question
What does this "[-1] " do?
preval<-data.frame(Col1=unique(unlist(mydat[,c("Col2","col3")]))[-1],
Col2=NA,col3=NA)
mydat <- read.table(textConnection("Col1 Col2 col3
Z1 K1 K2
Z2 NA NA
Z3 X1 NA
Z4 Y1 W1"),header = TRUE)
2018 Feb 24
0
include
x1 = rbind(unique(preval),mydat)
x2 <- x1[is.na(x1)] <- 0
x2 # gives 0
Why introduce the 'x2'? x1[...] <- 0 alters x1 in place and I think that
altered x1 is what you want.
You asked why x2 was zero. The value of the expression
f(a) <- b
and assignments are processed right to left so
x2 <- x[!is.na(x1)] <- 0
is equivalent to
x[!is.na(x1)] <- 0
x2
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:
2018 Feb 24
2
include
Hi All,
I am reading a file as follow,
mydat <- read.table(textConnection("Col1 Col2 col3
Z2 NA NA
Z3 X1 NA
Z4 Y1 W1"),header = TRUE)
1. "NA" are missing should be replace by 0
2. value that are in COl2 and Col3 should be included in col1 before
they appear
in col2 and col3. So the output data looks like as follow,
X1 0 0
Y1 0 0
W1 0 0
Z2 0 0
Z3 X1 0
Z4 Y1